Tag

this keyword

1 views collected around this technical thread.

37 Interactive Technology Team
37 Interactive Technology Team
Dec 12, 2022 · Frontend Development

Understanding the JavaScript "this" Keyword: From Basics to Deep Insights

This article demystifies JavaScript’s this keyword by covering its runtime binding rules in global, function, method, constructor, prototype, and arrow contexts, explaining strict‑mode differences, call/apply/bind usage, event‑handler behavior, and the underlying ECMAScript reference mechanics that determine its value.

Arrow FunctionsJavaScriptPrototype
0 likes · 16 min read
Understanding the JavaScript "this" Keyword: From Basics to Deep Insights
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 4, 2017 · Frontend Development

Mastering JavaScript’s this: When, Why, and How It Changes

This article provides a comprehensive, step‑by‑step explanation of JavaScript’s this binding, covering execution context, global and function scopes, strict mode nuances, call/apply usage, and constructor behavior, all illustrated with clear diagrams and code examples.

CALLExecution ContextJavaScript
0 likes · 13 min read
Mastering JavaScript’s this: When, Why, and How It Changes