Re:Introduction to Object-Oriented JavaScript - MDC Docs
by giberson on Wednesday May 04, 2011 @03:26PM
(#2514962)
This is not the case, because in the constructor person is being set to the argument. If the argument is not supplied (undefined), calling the instantiated object's gender property will result in undefined. [tested and confirmed]
A way I'd prefer might look like this: