Tag

hoisting

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 20, 2024 · Fundamentals

Understanding JavaScript Pre‑compilation and Hoisting

This article explains JavaScript's pre‑compilation process, including variable and function declaration hoisting, the creation of execution contexts, and the differences between var, let, and const, using several illustrative code examples to clarify how the engine resolves identifiers at runtime.

FundamentalsJavaScriptPre-compilation
0 likes · 7 min read
Understanding JavaScript Pre‑compilation and Hoisting
php中文网 Courses
php中文网 Courses
Jul 5, 2023 · Frontend Development

Understanding var, let, and const in JavaScript

This article explains the differences between JavaScript's var, let, and const declarations, covering their scopes, hoisting behavior, and mutability, and provides clear code examples for each. It also highlights how const variables can still be modified when they hold objects or arrays, helping developers choose the right keyword for reliable code.

JavaScriptScopeconst
0 likes · 5 min read
Understanding var, let, and const in JavaScript
WeDoctor Frontend Technology
WeDoctor Frontend Technology
Feb 23, 2022 · Frontend Development

Master JavaScript Scopes, Hoisting, and Closures: A Deep Dive

This article explains JavaScript's variable scope models—including lexical and dynamic scope—covers the three scope types (global, function, and block), details hoisting, the eval function, scope chains, and closures, and shows practical code examples for each concept.

ClosureEvalFrontend
0 likes · 18 min read
Master JavaScript Scopes, Hoisting, and Closures: A Deep Dive
MaoDou Frontend Team
MaoDou Frontend Team
Aug 14, 2019 · Frontend Development

Understanding JavaScript Hoisting: var, let, const and Function Declarations

This article explains how JavaScript engines hoist function and variable declarations, compares the behavior of var, let, and const during creation, initialization, and assignment, and demonstrates the resulting runtime errors and output through clear code examples.

ES6JavaScriptconst
0 likes · 7 min read
Understanding JavaScript Hoisting: var, let, const and Function Declarations
Yuewen Frontend Team
Yuewen Frontend Team
Nov 5, 2018 · Frontend Development

Master JavaScript Execution Contexts and Call Stack: A Deep Dive

This article explains how JavaScript execution contexts and the call stack work, covering their types, creation and execution phases, this binding, lexical and variable environments, and includes code examples to illustrate these core concepts for developers.

Call StackExecution ContextJavaScript
0 likes · 13 min read
Master JavaScript Execution Contexts and Call Stack: A Deep Dive
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Sep 3, 2017 · Frontend Development

Why Does let Appear Not to Be Hoisted? Unraveling JavaScript’s Variable Lifecycle

This article chronicles the author’s two‑month journey of understanding JavaScript’s let declaration, exploring its block scope, temporal dead zone, per‑iteration bindings, and the nuanced differences from var and function hoisting, while debunking common misconceptions with code examples and spec references.

ES6FrontendJavaScript
0 likes · 10 min read
Why Does let Appear Not to Be Hoisted? Unraveling JavaScript’s Variable Lifecycle