Level Up Frontend

hat's the Output of this Javascript Question? ⬇️ (Post 2)

const firstPromise = new Promise((res, rej) => {
setTimeout(res, 500, 'one');
});

const secondPromise = new Promise((res, rej) => {
setTimeout(res, 100, 'two');
});

Promise.race([firstPromise, secondPromise]).then(res => console.log(res));

------------------------------------------------------------------------------------------------------------------

⭐ Watch my Series on "Javascript Machine Coding Interview Questions for Dream Job" to understand concepts from an experienced developer and grow in your career. - www.youtube.com/playlist?list...

#promise #javascript #interviewquestion

10 months ago | [YT] | 188