JavaScript-Developer-I Exam Question 41

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?
  • JavaScript-Developer-I Exam Question 42

    Refer to code below:
    Let productSKU = '8675309' ;
    A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with 'sku', and padded with zeros.
    Which statement assigns the values sku0000000008675309 ?
  • JavaScript-Developer-I Exam Question 43

    Refer to the code below:

    Which value can a developer expect when referencing country,capital,cityString?
  • JavaScript-Developer-I Exam Question 44

    Refer to the code below:
    const addBy = ?
    const addByEight =addBy(8);
    const sum = addBYEight(50);
    Which two functions can replace line 01 and return 58 to sum?
    Choose 2 answers
  • JavaScript-Developer-I Exam Question 45

    Refer to code below:
    Function muFunction(reassign){
    Let x = 1;
    var y = 1;
    if( reassign ) {
    Let x= 2;
    Var y = 2;
    console.log(x);
    console.log(y);}
    console.log(x);
    console.log(y);}
    What is displayed when myFunction(true) is called?