Asynchronous JavaScript (original) (raw)

What is the purpose of the setTimeout function?

What does the then() method of a Promise do?

Which method allows handling errors in promises?

What does async do when used with a function?

What is the purpose of the await keyword?

What is the difference between setTimeout and setInterval?

What is the event loop's role in JavaScript?

Which queue has a higher priority in the JavaScript event loop?

What is the output of the following code?

JavaScript `

console.log("A"); setTimeout(() => console.log("B"), 0); Promise.resolve().then(() => console.log("C")); console.log("D");

`

What is the purpose of Promise.finally()?

There are 10 questions to complete.

Take a part in the ongoing discussion