ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 209 - Certified JavaScript Developer I discussion

Report
Export

Given the code below:

const delay = async delay =>{

return new Promise((resolve,reject)=>{

console.log(1);

setTimeout(resolve,deleay);

});

};

const callDelay = async ()=>{

console.log(2);

const yup = await delay(1000);

console.log(3);

}

console.log(4);

callDelay();

console.log(5);

What is logged to the console?

A.
4 2 1 5 3
Answers
A.
4 2 1 5 3
Suggested answer: A
asked 23/09/2024
Nghia To Duc
53 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first