Question 81

A developer has an is Dog function that takes one argument cat. They want to schedule the function to run every minute.
What is the correct syntax for scheduling this function?
  • Question 82

    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 83

    Universal Containers recently launched its new landing page to host a crowd-funding campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, it creates more than 50 new HTML items placed randomly inside the DOM, like the one in the code below:

    All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.
  • Question 84

    Refer to the code below:
    Async funct on functionUnderTest(isOK) {
    If (isOK) return 'OK' ;
    Throw new Error('not OK');
    )
    Which assertion accurately tests the above code?
  • Question 85

    Refer to the code below:
    01 const server = require('server');
    02 /* Insert code here */
    A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers Which code should be inserted at the line 03 to set up an event and start the web server ?