DEV Community

Discussion on: Take 'this' Quiz, Understand How 'this' Works in JavaScript

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

On the surface, 'this' seems like an intuitive keyword that simply refers to the environment (or scope) it resides in.

Note: It's actually context, not scope.

Collapse
 
liaowow profile image
Annie Liao

Ah, I see. So context is object-based, and scope is function-based (reference here: ryanmorr.com/understanding-scope-a...). Just corrected it. Thanks so much for clarifying!