JavaScript-Developer-I Exam Question 96

Refer to the code below:

What is the value of result after line 10 executes?
  • JavaScript-Developer-I Exam Question 97

    Refer to the code below:

    Line 05 causes an error.
    What are the values of greeting and salutation once code completes?
  • JavaScript-Developer-I Exam Question 98

    Refer to the code below:

    What value can a developer expect when referencing o,js,secondCity?
  • JavaScript-Developer-I Exam Question 99

    Refer to the code below:

    What is the value of result when the code executes?
  • JavaScript-Developer-I Exam Question 100

    Refer to the code below:
    new Promise((resolve, reject) => {
    const fraction = Math.random();
    if( fraction >0.5) reject("fraction > 0.5, " + fraction);
    resolve(fraction);
    })
    .then(() =>console.log("resolved"))
    .catch((error) => console.error(error))
    .finally(() => console.log(" when am I called?"));

    When does Promise.finally on line 08 get called?