Asynchronous JavaScript Flashcards

1
Q

What is a Promise?

A

A Promise is a special JavaScript object. It produces a value after an asynchronous (aka, async) operation completes successfully, or an error if it does not complete successfully due to time out, network error, and so on.

Successful call completions are indicated by the resolve function call, and errors are indicated by the reject function call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is asynchoronous?

A

Refers to the management of a single thread that can move past tasks that are waiting to complete the rest of the program. Synonymous with non-blocking.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly