JavaScript · Intermediate

Using it: picking the right tool and applying it correctly.

Intermediate·3.2.1

What is the JavaScript event loop responsible for?

Intermediate·3.2.2

What problem do Promises primarily solve compared to plain callbacks?

Intermediate·3.2.3

In a regular (non-arrow) function, what determines the value of `this`?

Intermediate·3.2.4

What do Array methods like `map`, `filter`, and `reduce` have in common?

Intermediate·3.2.5

What is 'hoisting' in JavaScript?

Intermediate·3.2.6

What is destructuring assignment used for?

Intermediate·3.2.7

What does the `...rest` parameter do in a function signature, e.g. `function f(a, ...rest) {}`?

Intermediate·3.2.8

What is the practical difference between `Array.prototype.forEach` and a `for...of` loop regarding `break`/`continue`?

Intermediate·3.2.9

What does `Object.freeze()` do to an object?

Intermediate·3.2.10

What is the purpose of default parameter values in a function declaration, e.g. `function f(x = 10) {}`?

Intermediate·3.2.11

What does `Array.prototype.find()` return when no element satisfies the predicate?

Intermediate·3.2.12

What practical advantage does a `Set` have over an `Array` for storing a collection of values?

Intermediate·3.2.13

What does optional chaining (`obj?.prop`) do?

Intermediate·3.2.14

What is the key difference between the nullish coalescing operator `??` and the logical OR `||`?

Intermediate·3.2.15

What does `Array.prototype.includes()` check for?

Intermediate·3.2.16

What does `Object.entries({a: 1, b: 2})` return?

Intermediate·3.2.17

What does calling an `async` function actually return, even if the function body never explicitly returns a Promise?

Intermediate·3.2.18

What is the (now largely superseded) module pattern using an Immediately Invoked Function Expression (IIFE) used for?

Intermediate·3.2.19

What does `Array.from({length: 3}, (_, i) => i * 2)` produce?

Intermediate·3.2.20

What is a tagged template literal, e.g. `` myTag`Hello ${name}` ``, used for?