Tagged articles
let
13 articles · Page 1 of 1
This article explains why a JavaScript function using var prints “2” twice, by detailing var’s function scope, variable hoisting, the compilation and execution phases, and contrasting the behavior with let and const, while offering practical coding recommendations to avoid common pitfalls.
JavaScriptconsthoisting
0 likes · 9 min read

This article explains how the traditional IIFE pattern, once essential for creating private scopes in JavaScript, has been superseded by modern block‑level scope using let and const, offering cleaner syntax, better performance, easier debugging, and seamless integration with ES6+ features.
IIFEJavaScriptblock scope
0 likes · 5 min read

This article examines common ES5 JavaScript patterns—such as var declarations, mixed function definitions, callback hell, the arguments object, constructor‑based inheritance, string concatenation, and manual loops—and shows how modern ES6+ features like let/const, arrow functions, promises, rest parameters, classes, template literals, spread syntax, and array methods provide cleaner, safer, and more maintainable code.
Arrow FunctionsAsync/AwaitES6
0 likes · 8 min read

This article examines why the traditional JavaScript var keyword should be avoided, explains the subtle pitfalls of its function scope, hoisting, and global leakage, and highlights the essential, often overlooked features of let and const—including temporal dead zone, true block scope, and immutability nuances.
JavaScriptconsthoisting
0 likes · 8 min read

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 PracticesTypeScriptconst
0 likes · 7 min read

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.
JavaScriptconsthoisting
0 likes · 5 min read

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.
ES6FunctionJavaScript
0 likes · 7 min read

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.
ES6Variable Scopefrontend
0 likes · 10 min read

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

This concise guide introduces seven frequently used ES6 features—including let, const, arrow functions, default parameters, destructuring, object shorthand, and template literals—explaining each concept so you can grasp them in roughly half an hour.
Arrow FunctionsES6JavaScript
0 likes · 1 min read

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

This article introduces four essential ES6 features—let/const variable declarations, template strings, the new Set and Map collections, and enhanced function parameters with defaults and object destructuring—providing clear code examples that demonstrate their advantages over ES5 syntax.
DestructuringES6JavaScript
0 likes · 5 min read

This article compares JavaScript's var and let declarations, showing how let provides block scope, avoids hoisting pitfalls, and delivers noticeable performance gains in loops, illustrated with clear code examples and benchmark results.
ES6JavaScriptlet
0 likes · 4 min read
