Question 6

Refer to the code below:
for(let number =2 ; number <= 5 ; number += 1 ) {
// insert code statement here
}
The developer needs to insert a code statement in the location shown. The code statement has these requirements:
1. Does require an import
2. Logs an error when the boolean statement evaluates to false
3. Works in both the browser and Node.js
Which meet the requirements?
  • Question 7

    Refer to HTML below:
    <p> The current status of an Order: <span id ="status"> In Progress </span> </p>.
    Which JavaScript statement changes the text 'In Progress' to 'Completed' ?
  • Question 8

    Refer to the following code:
    function test (val) {
    If (val === undefined) {
    return 'Undefined values!' ;
    }
    if (val === null) {
    return 'Null value! ';
    }
    return val;
    }
    Let x;
    test(x);
    What is returned by the function call on line 13?
  • Question 9

    Refer to the following code:

    Which statement should be added to line 09 for the code to display 'The boat has a capacity of 10 people?
  • Question 10

    A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript.
    To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is fully loaded (HTML content and all related files), in order to do some custom initializations.
    Which implementation should be used to call Fe:s:-a;::eHec5;te::.-.ter.: based on the business requirement above?