All fields

“Promises & async/await” in Information Technology

13 questions across 2 technologies.

Information Technology

13 questions in 2 technologies

#QuestionTechnologyTopicLevel
1How does async/await relate to Promises under the hood, and what does 'await' actually do to program execution? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
2How do you catch errors from a Promise chain versus async/await? JavaScript › Error HandlingJavaScriptError HandlingIntermediate
3How does async/await map onto the microtask queue under the hood? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
4How were generators historically used to write asynchronous code before async/await existed? JavaScript › Iterators & GeneratorsJavaScriptIterators & GeneratorsAdvanced
5How do you loop over an async iterable? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsBeginner
6What is the difference between the microtask queue and the macrotask (task) queue? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
7Why might Promise.all() be the wrong tool when consuming many async iterators? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsAdvanced
8How do you write an effective test for asynchronous code? JavaScript › Debugging, Testing & ToolingJavaScriptDebugging, Testing & ToolingAdvanced
9How do global error handlers like window.onerror and unhandledrejection work? JavaScript › Error HandlingJavaScriptError HandlingAdvanced
10How do you implement a retry-with-backoff pattern around a function that might throw? JavaScript › Error HandlingJavaScriptError HandlingAdvanced
11How does top-level await work, and what constraint does it place on modules that import that module? JavaScript › ES ModulesJavaScriptES ModulesAdvanced
12Why does Promise.resolve().then(cb) run before setTimeout(cb, 0), even with a 0ms delay? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
13What is 'starvation' of the macrotask queue, and how can recursive microtasks cause it? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced