Async JavaScript Pitfalls
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
20 questions
- 1In the asynchronous programming landscape, single synchronous values are simply called_____.
Hint
Think of the simplest way to represent a single piece of data that is available immediately.
Answer
a value
- 2Synchronous multiple values are represented by_____in JavaScript.
Hint
Arrays, maps, sets, and strings all implement this interface.
Answer
iterables
- 3Asynchronous single values are handled by_____such as callbacks and promises.
Hint
These are constructs that let you work with values that will be available later.
Answer
abstractions
- 4The fourth quadrant in the asynchronous landscape is_____which handles asynchronous multiple values.
Hint
This concept allows you to work with streams of data that arrive over time.
Answer
observables
- 5A promise is a_____object that represents an eventual value.
Hint
This means it can be passed to functions and returned from functions like any other object.
Answer
first-class
- 6One major problem with ES6 promises is that_____is not part of the contract.
Hint
Think of a scenario where you no longer need the result of an asynchronous operation.
Answer
cancellation
- 7Reactive applications can react to stimulus, load, failure, and most importantly, to_____.
Hint
The primary goal is to keep the interface responsive to human interactions.
Answer
the user
- 8In the observable mouse drag example, the_____operator flattens a sequence of sequences into a single stream.
Hint
This operator is similar to combining map and flatten; it projects each value into a new observable and merges them.
Answer
flatMap
- 9The_____operator is used to stop an observable sequence when another observable emits, such as stopping a drag on mouseup.
Hint
This operator takes values from the source until a notifier observable fires.
Answer
takeUntil
- 10To avoid overloading the server in an autocomplete scenario, one can use_____to delay firing until the user stops typing.
Hint
This technique waits for a pause in input before sending a request.
Answer
throttle (or debounce)
- 11Observables solve the problem of_____responses in asynchronous operations.
Hint
When multiple requests are sent, the order of responses may not match the order of requests.
Answer
out-of-order
- 12The mantra 'everything is a_____' is central to thinking in observables.
Hint
Think of all asynchronous data sources as sequences of events over time.
Answer
stream
- 13FRP (Functional Reactive Programming) differs from observables in that it deals with_____over continuous time.
Hint
These are values that change continuously, not just at discrete events.
Answer
behaviors
- 14In JavaScript generators, the_____keyword suspends execution until a value is requested.
Hint
This keyword is used inside a generator function to produce values one at a time.
Answer
yield
- 15The async/await syntax has been approved for adoption in ES_____.
Hint
This version of ECMAScript is the next after ES6.
Answer
7
- 16Node.js streams version 2 introduced_____mode, allowing consumption of objects instead of just buffers/strings.
Hint
This mode enables streams to handle JavaScript objects directly.
Answer
object
- 17The WHATWG streams specification aims to standardize low-level APIs for_____.
Hint
This group works on web standards for the browser platform.
Answer
browsers
- 18Dart unifies asynchronous programming with_____for single values and streams for multiple values.
Hint
This is Dart's equivalent of a promise.
Answer
futures
- 19One technique for implementing back pressure in observables is to use pauseable buffer, which is a_____form of back pressure.
Hint
It ensures no events are dropped while the consumer is paused.
Answer
lossless
- 20The proposal for async generators allows using the_____syntax to iterate over asynchronous streams.
Hint
This syntax is inspired by the for...of loop but for async sources.
Answer
for/on

Ask anything
We've read this whole study set, so questions about it get the best answers.