Depends on whether you 1) fix the code (you're missing a comma after the height and a closing } at the end) and 2) don't have "use strict" before the code (in which case this is set to undefined until explicitly set by call/apply or in prototypal methods); then the first console.log will show the person and the second one window/global (depending on your JS runtime).
Depends on whether you 1) fix the code (you're missing a comma after the height and a closing
}
at the end) and 2) don't have"use strict"
before the code (in which casethis
is set to undefined until explicitly set by call/apply or in prototypal methods); then the first console.log will show the person and the second one window/global (depending on your JS runtime).Well spotted on the code error. Was not intentional and have since updated it :P