1. Home
  2. Explore
  3. Computer Science
  4. Async JavaScript Pitfalls

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Async JavaScript Pitfalls

  • 20Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Async Landscape
In the asynchronous programming landscape, single synchronous values are simply called
.

20 questions

  1. 1
    In 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

  2. 2
    Synchronous multiple values are represented by
    _____
    in JavaScript.
    Hint

    Arrays, maps, sets, and strings all implement this interface.

    Answer

    iterables

  3. 3
    Asynchronous 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

  4. 4
    The 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

  5. 5
    A 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

  6. 6
    One 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

  7. 7
    Reactive 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

  8. 8
    In 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

  9. 9
    The
    _____
    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

  10. 10
    To 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)

  11. 11
    Observables 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

  12. 12
    The 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

  13. 13
    FRP (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

  14. 14
    In 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

  15. 15
    The async/await syntax has been approved for adoption in ES
    _____
    .
    Hint

    This version of ECMAScript is the next after ES6.

    Answer

    7

  16. 16
    Node.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

  17. 17
    The WHATWG streams specification aims to standardize low-level APIs for
    _____
    .
    Hint

    This group works on web standards for the browser platform.

    Answer

    browsers

  18. 18
    Dart unifies asynchronous programming with
    _____
    for single values and streams for multiple values.
    Hint

    This is Dart's equivalent of a promise.

    Answer

    futures

  19. 19
    One 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

  20. 20
    The 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

1 of 20
Question 1 of 20

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent