Tag

Scope Chain

1 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Feb 8, 2023 · Frontend Development

JavaScript's Forgotten Keyword: with

The article explains the obscure JavaScript 'with' keyword, demonstrating its syntax and behavior, detailing how it manipulates the scope chain, and outlining the numerous drawbacks—including strict‑mode prohibition, variable shadowing, security risks, performance penalties, and poor maintainability—that make its use inadvisable.

JavaScriptScope ChainStrict Mode
0 likes · 7 min read
JavaScript's Forgotten Keyword: with
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 29, 2022 · Fundamentals

Understanding JavaScript Closures and Their Memory‑Leak Mechanisms

This article demystifies JavaScript closures, explains how V8 builds scope chains and closure objects during compilation, and demonstrates why closures can cause memory leaks by retaining references, illustrated with multiple runnable code examples and practical debugging tips.

ClosureJavaScriptScope Chain
0 likes · 14 min read
Understanding JavaScript Closures and Their Memory‑Leak Mechanisms
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Nov 29, 2021 · Fundamentals

Why JavaScript’s with Statement Can Leak Data and Slow Down Your Code

This article explains how the JavaScript with statement creates a new lexical scope that can unintentionally create global variables, cause data leakage, and dramatically degrade performance, while also covering LHS/RHS lookup, execution contexts, variable/activation objects, and scope chain mechanics.

Execution ContextJavaScriptLHS
0 likes · 8 min read
Why JavaScript’s with Statement Can Leak Data and Slow Down Your Code
vivo Internet Technology
vivo Internet Technology
Aug 14, 2019 · Fundamentals

Writing High‑Quality JavaScript Functions: Execution Mechanism, Robustness, Functional Programming and Design Patterns

This introductory article explains how JavaScript functions are created and executed—detailing heap allocation, name hoisting, stack frames, parameter binding, scope‑chain lookup and closures—while offering practical tips for reducing lookups, avoiding recursion overflow, and laying the foundation for a series on robust, functional, and pattern‑driven function design.

ClosuresExecution MechanismJavaScript
0 likes · 21 min read
Writing High‑Quality JavaScript Functions: Execution Mechanism, Robustness, Functional Programming and Design Patterns
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 7, 2017 · Frontend Development

Master Chrome Breakpoint Debugging: Uncover Closures, Scope, and this in JavaScript

This guide explains how to use Chrome's breakpoint debugging to step through JavaScript code, visualize the call stack, scope chain, and this binding, and understand closures through practical examples, helping developers quickly locate bugs and grasp execution flow.

Breakpoint DebuggingChromeFrontend Development
0 likes · 11 min read
Master Chrome Breakpoint Debugging: Uncover Closures, Scope, and this in JavaScript
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 2, 2017 · Frontend Development

Master JavaScript Closures: Clear Explanation of Scope Chains and Real-World Uses

This article demystifies JavaScript closures by explaining scope, scope chains, and execution contexts, showing how closures work with practical examples like setTimeout, currying, and module patterns, and even provides a classic interview challenge to test your understanding.

FrontendJavaScriptScope Chain
0 likes · 12 min read
Master JavaScript Closures: Clear Explanation of Scope Chains and Real-World Uses
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Apr 30, 2017 · Frontend Development

Understanding JavaScript Variable Objects: From Creation to Execution

This article explains how JavaScript creates and uses the Variable Object during the creation and execution phases of an execution context, covering arguments, function and variable declarations, hoisting, scope chain, and the relationship with the global window object.

Execution ContextJavaScriptScope Chain
0 likes · 6 min read
Understanding JavaScript Variable Objects: From Creation to Execution