So i’m continuing on with the JS course, and i think i’m doing okay so far. I do have a question relating to objects and the
In This lesson , we learn that
Now, from this codesnippet (warning: it’s paraphrased from the rest of that lesson), it looks like the if statement is a direct child of the
openRestaurant function. Wouldn’t that be accessible at a block scope level? Or local (to the full object, and the function)?
Some pointers on this would be appreciated (as per the lesson though, I understand what
this is doing.