Question 121

Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array.length; i++){
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of the array after the code executes?
  • Question 122

    Refer to the code below:
    Let str = 'javascript';
    Str[0] = 'J';
    Str[4] = 'S';
    After changing the string index values, the value of str is 'javascript'. What is the reason
    for this value:
  • Question 123

    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 124

    A developer is debugging a web server that uses Node.js. The server hits a runtime error every third request to an important endpoint on the web server.
    The developer added a break point to the start script, that is at index, js at the root of the server's source code. The developer wants to make use of Chrome DevTools to debug.
    Which command can be run to access DevTools and make sure the breakpoint is hit?
  • Question 125

    Which three browser specific APIs are available for developer to persist data between page loads?
    Choose 3 answers