Quiz library
About 3 minutes

Question 1 of 5

What does a Promise represent in JavaScript?

Exit quiz

Need a teammate, not a test?

Build something great with a JavaScript expert.

Meet our developers

Study guide

JavaScript quiz questions and answers

Review all 5 questions at your own pace. Open each answer to see the correct response and a concise explanation of the concept.

1What does a Promise represent in JavaScript?

Correct answer

A future async result

Promises represent asynchronous work that may resolve or reject later.

2What is a closure?

Correct answer

A function retaining access to its outer scope

Closures let functions use variables from the scope where they were created.

3Which keyword declares a block-scoped variable?

Correct answer

let

let and const are block-scoped, while var is function-scoped.

4What does event delegation rely on?

Correct answer

Event bubbling

Event delegation attaches one handler to a parent and handles events bubbled from children.

5What can block user interactions in the browser?

Correct answer

Long-running JavaScript on the main thread

Heavy synchronous JavaScript prevents the browser from responding quickly to input.