13 questions for “Promises & async/await”

Found in 1 field. Select a question to see its full answer.

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