Question 111

Refer to the following code block:
01 let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
02 let output = 0;
03
04 for (let num of array) {
05 if (output > 10) {
06 break;
07 }
08 if (num % 2 == 0) {
09 continue;
10 }
11 output += num;
12 }
What is the value of output after the code executes?
  • Question 112

    Which two code snippets showworking examples of a recursivefunction?
    Choose 2 answers
  • Question 113

    Given the code below:
    const delay = async delay =>{
    return new Promise((resolve,reject)=>{
    console.log(1);
    setTimeout(resolve,deleay);
    });
    };
    const callDelay = async ()=>{
    console.log(2);
    const yup = await delay(1000);
    console.log(3);
    }
    console.log(4);
    callDelay();
    console.log(5);
    What is logged to the console?

    Question 114

    Refer to the code below:
    const event = new CustomEvent(
    //Missing Code
    );
    obj.dispatchEvent(event);
    A developer needs to dispatch a custom event called update to send information about recordId.
    Which two options could a developer insert at the placeholder in line 02 to achieve this?
    Choose 2 answers
  • Question 115

    Given the code below:
    01 const delay = async delay = > {
    02 return new Promise((resolve, reject) = > {
    03 console.log(1);
    04 setTimeout(resolve, delay);
    05 });
    06 };
    07
    08 const callDelay = async () = > {
    09 console.log(2);
    10 const yup = await delay(1000);
    11 console.log(3);
    12 };
    13
    14 console.log(4);
    15 callDelay();
    16 console.log(5);
    What is logged to the console?