Untitled

mail@pastecode.io avatarunknown
javascript
a month ago
316 B
1
Indexable
Never
Predict the output of the below JavaScript code?

const promiseFunction = () => { 
    return new Promise((resolve, reject) => { setTimeout(() => console.log("second"), 1000); });
}

const dummyFunction = async () => { console.log("first"); 
    await promiseFunction();
    console.log("third");
}

dummyFunction();