Transcript from the "Global Objects" Lesson
>> Brian Holt: So here, I'm talking about what this is can be in other settings, right? So that's a console.log like this is window and that's true, right? So in this particular case, whenever I'd call this, it is referring to the entire window. And you can see here that this .scroll which is how far down on the page scroll is exactly the same.
[00:00:24] In fact, if I change it, it'll change based on where I am which is kind of cool, right? But if I land live in the same place, it won't change, right? I'm not scrolling anywhere. We can see I can access that both on this .scrollY and we know .scrollY, because they are the same thing.
[00:00:48] Yep, so here, I kind of restate that. If you're inside an object, a good rule of thumb that this will be the object. If you are not inside of an object of some sort, this is gonna be window or whatever the global object is which for browsers is window.
>> Speaker 2: [COUGH] The attributes in the objects, do they have names? How we should, call them?
>> Brian Holt: Yeah, like the keys or properties?
>> Speaker 2: Keys, yeah, or just key in.
>> Brian Holt: This is the key. This is the value and the whole thing would be called up like a property.
>> Speaker 2: A property, okay.
>> Brian Holt: Yep.
>> Speaker 2: [LAUGH]
>> Brian Holt: It feels more like jeopardy than if feels like an interview. So that's actually, probably a pretty good one to figure out context and what this is and those sorts of things.