Closed OliverSieweke closed 5 years ago
Before the Square.prototype object gets replaced, its initial constructor property is non-enumerable. Keeping the constructor property non-enumerable would conform better to expected behaviour (without adding any complexity to the code).
Nice catch! I'd prefer to leave the enumerable property defined for clarity, so I fixed it here: https://github.com/nzakas/understandinges6/commit/1a465be3c2335aac3c4dc9bbb783b95d7af6e987
enumerable
Before the Square.prototype object gets replaced, its initial constructor property is non-enumerable. Keeping the constructor property non-enumerable would conform better to expected behaviour (without adding any complexity to the code).