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

Here’s the conundrum: we’ve got references to the property started in the fiat object’s methods, and normally when we’re trying to resolve a variable in a function, that variable turns out to be a local variable, a parameter of the function or a global variable. But in the drive method, started is none of those things; instead, it’s a property of the fiat object.


Cover of Head First JavaScript Programming


What is the order in which a function checks variables?