# javascript-questions | Lydia Hallie | Knowledge Base | Instagit

A long list of (advanced) JavaScript questions, and their explanations :sparkles:  

GitHub Stars: 65.3k

Repository: https://github.com/lydiahallie/javascript-questions

---

## Articles

### [How the JavaScript Spread Operator Works with Objects and Arrays](/lydiahallie/javascript-questions/how-does-the-spread-operator-work-with-objects-and-arrays)

Discover how the JavaScript spread operator works with objects and arrays. Learn to create shallow copies efficiently and expand iterables for cleaner code.

- Tags: deep-dive
- Published: 2026-03-04

### [Differences Between var, let, and const Declarations in JavaScript](/lydiahallie/javascript-questions/what-are-the-differences-between-var-let-and-const-declarations)

Understand the key differences between JavaScript var let and const declarations including hoisting scope and mutability Learn how to choose the right declaration for your code

- Tags: deep-dive
- Published: 2026-03-04

### [How JavaScript Handles Primitive Wrapper Types: Automatic Boxing vs. Explicit Wrappers](/lydiahallie/javascript-questions/how-does-javascript-handle-primitive-wrapper-types)

Discover how JavaScript handles primitive wrapper types, from automatic boxing to explicit wrapper objects, and understand their unique behaviors.

- Tags: deep-dive
- Published: 2026-03-04

### [for...in vs for...of Loops in JavaScript: Key Differences Explained](/lydiahallie/javascript-questions/what-is-the-difference-between-forin-and-forof-loops)

Understand the key differences between JavaScript for...in and for...of loops. Learn when to use each to iterate over object properties or iterable values efficiently.

- Tags: deep-dive
- Published: 2026-03-04

### [How Does the JSON.stringify Replacer Function Work: Array vs Function Guide](/lydiahallie/javascript-questions/how-does-jsonstringify-replacer-function-work)

Learn how JSON.stringify replacer functions work with arrays and callback functions. Filter and transform data for precise JSON output. Master JavaScript serialization.

- Tags: deep-dive
- Published: 2026-03-04

### [What Are Template Literals and Tagged Template Functions in JavaScript?](/lydiahallie/javascript-questions/what-are-template-literals-and-tagged-template-functions)

Master JavaScript template literals and tagged template functions. Learn how to embed expressions and customize string output for cleaner, more powerful code.

- Tags: deep-dive
- Published: 2026-03-04

### [How Object.defineProperty Affects Object Enumerability in JavaScript](/lydiahallie/javascript-questions/how-does-objectdefineproperty-affect-object-enumerability)

Learn how Object.defineProperty affects object enumerability in JavaScript. By default, it creates non-enumerable properties hidden from loops but accessible directly.

- Tags: deep-dive
- Published: 2026-03-04

### [How Array.prototype.map Handles Undefined Return Values in JavaScript](/lydiahallie/javascript-questions/how-does-arrayprototypemap-handle-undefined-return-values)

Discover how Array.prototype.map handles undefined return values in JavaScript. Learn how it creates new arrays with undefined entries for missing returns.

- Tags: deep-dive
- Published: 2026-03-04

### [sessionStorage vs localStorage: Understanding the Key Differences](/lydiahallie/javascript-questions/what-is-the-difference-between-sessionstorage-and-localstorage)

Learn the key differences between sessionStorage and localStorage in JavaScript. Understand data lifetime and choose the right storage for your web application.

- Tags: deep-dive
- Published: 2026-03-04

### [How JavaScript Generators and Yield Work: A Complete Guide to `function*` and Iteration Control](/lydiahallie/javascript-questions/how-do-javascript-generators-and-yield-work)

Understand how JavaScript generators and yield work with function* and iteration control. Master pausing and resuming function execution for efficient code.

- Tags: deep-dive
- Published: 2026-03-04

### [What Happens When You Use "use strict" Mode in JavaScript](/lydiahallie/javascript-questions/what-happens-when-you-use-use-strict-mode)

Discover what happens when you use "use strict" in JavaScript. Learn how it enforces safer coding, prevents errors, and avoids accidental global variables for cleaner code.

- Tags: deep-dive
- Published: 2026-03-04

### [JavaScript Type Coercion with the `+` Operator: A Complete Guide](/lydiahallie/javascript-questions/how-does-javascript-type-coercion-work-with-the-plus-operator)

Master JavaScript type coercion with the + operator. Learn how it concatenates strings or adds numbers using ToPrimitive and ToNumber abstract operations. Get the complete guide now.

- Tags: deep-dive
- Published: 2026-03-04

### [Function and Arrow Function Scope in JavaScript: 4 Critical Differences Explained](/lydiahallie/javascript-questions/what-is-the-difference-between-function-and-arrow-function-scope)

Master JavaScript function and arrow function scope differences. Understand how `this` behaves in each to avoid common bugs and write cleaner code.

- Tags: deep-dive
- Published: 2026-03-04

### [How JavaScript Promises and Promise.race Resolve: A Deep Dive into Asynchronous Settlement](/lydiahallie/javascript-questions/how-do-javascript-promises-and-promiserace-resolve)

Understand how JavaScript Promises and Promise.race resolve asynchronously. Learn about micro-task queues and immediate settlement with Promise.race for efficient async code.

- Tags: deep-dive
- Published: 2026-03-04

### [What Is the Temporal Dead Zone with let and const in JavaScript?](/lydiahallie/javascript-questions/what-is-the-temporal-dead-zone-with-let-and-const)

Understand JavaScript's temporal dead zone TDZ with let and const. Learn why accessing variables before declaration causes ReferenceErrors and how to avoid them.

- Tags: deep-dive
- Published: 2026-03-04

### [How Does setTimeout Behave in Asynchronous JavaScript? A Deep Dive into the Event Loop](/lydiahallie/javascript-questions/how-does-settimeout-behave-in-asynchronous-javascript)

Understand how setTimeout works in asynchronous JavaScript. Explore its interaction with the event loop, task queue, and call stack for guaranteed execution and scope clarity.

- Tags: deep-dive
- Published: 2026-03-04

### [Three Phases of Event Propagation in JavaScript: Capturing, Target, and Bubbling Explained](/lydiahallie/javascript-questions/what-are-the-three-phases-of-event-propagation)

Understand the three phases of event propagation in JavaScript: capturing, target, and bubbling. Learn how events travel through the DOM in this essential guide.

- Tags: deep-dive
- Published: 2026-03-04

### [How Object Reference Assignment Differs from Primitive Assignment in JavaScript](/lydiahallie/javascript-questions/how-does-object-reference-assignment-differ-from-primitive-assignment)

Understand the core difference between object reference assignment and primitive assignment in JavaScript. Learn how one copies references and the other copies values.

- Tags: deep-dive
- Published: 2026-03-04

### [How JavaScript Prototypes and the Prototype Chain Work: A Complete Guide](/lydiahallie/javascript-questions/how-do-javascript-prototypes-and-the-prototype-chain-work)

Understand how JavaScript prototypes and the prototype chain enable inheritance. Learn how the engine traverses prototypes to find properties and methods.

- Tags: deep-dive
- Published: 2026-03-04

### [== vs === Equality Operators in JavaScript: Understanding the Difference](/lydiahallie/javascript-questions/what-is-the-difference-between-equality-operators)

Discover the crucial difference between JavaScript's == and === equality operators. Learn how type coercion impacts comparisons and why === offers predictable, strict equality for your code.

- Tags: deep-dive
- Published: 2026-03-04

### [How the JavaScript Event Loop and Task Queue Work: A Complete Guide](/lydiahallie/javascript-questions/how-does-the-javascript-event-loop-and-task-queue-work)

Understand the JavaScript event loop and task queue. Learn how it enables single threaded concurrency by monitoring the call stack and processing tasks efficiently.

- Tags: deep-dive
- Published: 2026-03-04

### [How JavaScript Hoisting Works: var vs let vs const Explained](/lydiahallie/javascript-questions/how-does-javascript-hoisting-work-with-var-vs-let-vs-const)

Understand JavaScript hoisting with var let and const. Learn how declarations move to the top and discover the difference in initialization for var let and const.

- Tags: deep-dive
- Published: 2026-03-04

