Exam4Training

What is logged to the console?

Given the code below:

const delay = sync delay => {

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

setTimeout (resolve,delay);});};

const callDelay =async () => {

const yup =await delay (1000);

console.log (1);

What is logged to the console?
A . 123
B . 132
C . 213
D . 231

Answer: D

Exit mobile version