If you don’t use new there’s no object to return from the constructor, which means there is no object assigned to the darkside variable, so darkside is undefined. That’s why when we try to call the play method, we get an error saying the object we’re trying to call it on is undefined.
- 12. Advanced Object Construction: Creating objects
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
what does it mean to be an "undefined"?