O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

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.


Cover of Head First JavaScript Programming


what does it mean to be an "undefined"?