Question 41

A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a good experience, a script named personaliseContext needs to be executed when the webpage is fully loaded (HTML content and all related files ), in order to do some custom initialization.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?
  • Question 42

    A developer receives a comment from the Tech Lead that the code given below has error:
    const monthName = 'July';
    const year = 2019;
    if(year === 2019) {
    monthName = 'June';
    }
    Which line edit should be made to make this code run?
  • Question 43

    Refer to the code below:
    let timeFunction =() => {
    console.log('Timer called.");
    };
    let timerId = setTimeout (timedFunction, 1000);
    Which statement allows a developer to cancel the scheduled timed function?
  • Question 44

    Refer to the following code:
    01 function Tiger(){
    02 this.Type = 'Cat';
    03 this.size = 'large';
    04 }
    05
    06 let tony = new Tiger();
    07 tony.roar = () =>{
    08 console.log('They\'re great1');
    09 };
    10
    11 function Lion(){
    12 this.type = 'Cat';
    13 this.size = 'large';
    14 }
    15
    16 let leo = new Lion();
    17 //Insert code here
    18 leo.roar();
    Which two statements could be inserted at line 17 to enable the function call on line 18?
    Choose 2 answers.
  • Question 45

    Refer to the HTML below:
    <div id="main">
    <ul>
    <li>Leo</li>
    <li>Tony</li>
    <li>Tiger</li>
    </ul>
    </div>
    Which JavaScript statement results in changing " Tony" to "Mr. T."?