JS Flashcard

JS Flashcard

Assessment

Flashcard

Computers

12th Grade

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

29 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the purpose of a Promise in JavaScript?

Back

To handle asynchronous operations

2.

FLASHCARD QUESTION

Front

What is the state of a Promise when it is created?

Back

Pending

3.

FLASHCARD QUESTION

Front

Which method is used to handle a successful Promise resolution? Options: catch(), finally(), then(), reject()

Back

then()

4.

FLASHCARD QUESTION

Front

Which method is used to handle a rejected Promise? Options: then(), finally(), catch(), resolve()

Back

catch()

5.

FLASHCARD QUESTION

Front

What does the 'async' keyword do in a function declaration?

Back

Makes the function return a Promise

6.

FLASHCARD QUESTION

Front

What does the 'await' keyword do?

Back

Waits for a Promise to resolve

7.

FLASHCARD QUESTION

Front

What is the JavaScript Event Loop responsible for?

Back

Handling asynchronous callbacks

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?