JS-Dev-101 practice question 3 of 25

Given the code below: 01 const delay = async delay => { 02 return new Promise((resolve, reject) => { 03 console.log(1); 04 setTimeout(resolve…

Choose your answer, then check it against the explanation.

Given the code below: 01 const delay = async delay => { 02 return new Promise((resolve, reject) => { 03 console.log(1); 04 setTimeout(resolve, delay); 05 }); 06 }; 07 08 const callDelay = async () => { 09 console.log(2); 10 const yup = await delay(1000); 11 console.log(3); 12 }; 13 14 console.log(4); 15 callDelay(); 16 console.log(5); What is logged to the console?
Answer options
Question 3 of 25

Keep practicing

Take the free JS-Dev-101 practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other JS-Dev-101 practice questions

Scroll to Top