Question 1

Refer to the following code:
Let sampleText = 'The quick brown fox jumps';
A developer needs to determine if a certain substring is part of a string.
Which three expressions return true for the given substring ?
Choose 3 answers
  • Question 2

    Refer to the code below?
    Let searchString = ' look for this ';
    Which two options remove the whitespace from the beginning of searchString?
    Choose 2 answers
  • Question 3

    Refer to the code below:
    <html lang="en">
    <table onclick="console.log(Table log');">
    <tr id="row1">
    <td>Click me!</td>
    </tr>
    <table>
    <script>
    function printMessage(event) {
    console.log('Row log');
    }
    Let elem = document.getElementById('row1');
    elem.addEventListener('click', printMessage, false);
    </script>
    </html>
    Which code change should be made for the console to log only Row log when 'Click me! ' is clicked?
  • Question 4

    Refer to the code below:
    Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ];
    Which two statements result in the array [1, 2, 3, 4, 5] ?
    Choose 2 answers
  • Question 5

    developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality.
    The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
    Given the code and the information the developer has, which code logs an error at boost with an event?