JAVASCRIPT-DEVELOPER-I Web TestEngine demo

Exit VCEDump JAVASCRIPT-DEVELOPER-I Salesforce Certified JavaScript Developer (JS-Dev-101)
Question 6 of 34
0% complete
Q6 Single choice

Refer to the code below:

Let car1 = new Promise((_ , reject) =>

setTimeout(reject, 2000, "car 1 crashed in" =>

Let car2 =new Promise(resolve => setTimeout(resolve, 1500, "car 2 completed")

Let car3 =new Promise(resolve =>setTimeout(resolve, 3000, "car 3 completed")

Promise.race(( car1, car2, car3))

.then (value => (

Let result = `$(value) the race.';)}

.catch(arr => {

console.log("Race is cancelled.", err);

});

What is the value of result when Promise.race executes?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in