Sector file // javascript
JAVASCRIPTDECODED.
Closures, async & the core
Easy
24 questionsHow would you use Object.groupBy() to group an array of orders by status, and how does it compare to a manual reduce()?
Frontend ยท 1.2k views ยท es2024, tricky, real-world
How does Array.prototype.with() let you replace one array element immutably, and where would that pattern actually help?
Phone Screen ยท 1.1k views ยท es2023, tricky, real-world
How does Array.prototype.toSorted() differ from .sort(), and why does that matter when updating state immutably?
Phone Screen ยท 1.1k views ยท es2023, tricky, real-world
How does Object.groupBy() work in ES2024 and when should you use it over reduce?
Frontend ยท 1.1k views ยท es2024, array, object-groupby
What is the difference between for...of and for...in?
Frontend ยท 986 views ยท for-of, for-in
What does Array.filter do?
Frontend ยท 950 views ยท filter
What are optional chaining and nullish coalescing?
Frontend ยท 872 views ยท optional-chaining
What is the difference between includes and indexOf?
Frontend ยท 807 views ยท array-methods, includes
Medium
25 questionsSet methods deep-dive: performance and mutability trade-offs vs manual loops?
DSA ยท 1.2k views ยท set, performance, es2024
When should you use Map and Set over objects and arrays?
Frontend ยท 1.1k views ยท map, set
Implement a robust Event Emitter class.
DSA ยท 1.1k views ยท design-patterns, pubsub, event-emitter
How do you implement a deepFreeze function recursively?
Frontend ยท 935 views ยท objects, recursion, immutability
How does Array.reduce work?
Frontend ยท 822 views ยท reduce
What is the difference between call, apply, and bind?
Frontend ยท 801 views ยท call-apply-bind
How do you implement a custom Promise.all polyfill?
DSA ยท 724 views ยท promises, polyfill, async
What do flat and flatMap do?
Frontend ยท 692 views ยท flat, flatmap
Hard
19 questionsWhat is the difference between Promise.all, allSettled, race, and any?
Frontend ยท 1.1k views ยท promises, combinators
How does `Atomics.waitAsync()` enable non-blocking waits on SharedArrayBuffer?
DSA ยท 1.1k views ยท atomics, sharedarraybuffer, concurrency
Why can pushing a single non-numeric value into a large numeric array tank its performance in V8, and how would you avoid it?
System Design ยท 1.1k views ยท v8, tricky, real-world
Implement an async task queue with a concurrency limit.
System Design ยท 1.1k views ยท promises, concurrency, queue
What does yield* do in a generator?
Frontend ยท 1.0k views ยท generators
What are async iterators and for await...of?
Frontend ยท 1.0k views ยท async-iterators
How does SharedArrayBuffer let two Web Workers share memory directly, and what race conditions do you need to guard against?
System Design ยท 1.0k views ยท workers, tricky, real-world
How would you make a custom class iterable with for...of by implementing Symbol.iterator as a generator method?
DSA ยท 936 views ยท iterators, tricky, real-world
Seen a JavaScript question that is not here? Add it and help the next candidate.
Share a question