Tag

let

1 views collected around this technical thread.

Java Tech Enthusiast
Java Tech Enthusiast
Sep 10, 2024 · Frontend Development

Prefer const over let in modern JavaScript/TypeScript

Modern JavaScript/TypeScript development should default to using const instead of let, because const enforces immutability, improves readability, and avoids bugs, while let is reserved only for truly mutable cases such as loop counters, with tools like ESLint’s prefer‑const rule helping enforce this practice.

Best PracticesFrontendJavaScript
0 likes · 7 min read
Prefer const over let in modern JavaScript/TypeScript
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
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
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
Baidu Intelligent Testing
Baidu Intelligent Testing
Aug 18, 2017 · Frontend Development

Practical Guide to ES6 Features and Performance Comparisons in Node.js

This article reviews the compatibility of various Node.js versions with ES6 features, explains key ES6 constructs such as let, const, template literals, default parameters, destructuring, and classes, and presents performance benchmarks comparing these features to their ES5 equivalents, concluding with practical recommendations for developers.

ES6JavaScriptNode.js
0 likes · 6 min read
Practical Guide to ES6 Features and Performance Comparisons in Node.js
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 25, 2017 · Frontend Development

Master Essential ES6 Features: Let/Const, Arrow Functions, Templates, and More

This article offers a practical guide to the most commonly used ES6 features—let/const, arrow functions, template literals, destructuring, default parameters, spread operator, object literals, and classes—explaining their syntax, behavior, and real‑world usage to help developers quickly master modern JavaScript.

Arrow FunctionsDestructuringES6
0 likes · 12 min read
Master Essential ES6 Features: Let/Const, Arrow Functions, Templates, and More