DEV Community


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

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.

liaowow profile image
Annie Liao Author

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