Question 6

A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.
A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.

Which two results occur when running this test on the updated sum3 function? Choose 2 answers
  • Question 7

    Console logging methods that allow string substitution:
  • Question 8

    The developer has a function that prints "Hello" to an input name. To test this,thedeveloper created a function that returns "World". However the following snippet does not print " Hello World".

    What can the developer do to change the code to print "Hello World" ?
  • Question 9

    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 insidethe 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 10

    Which three actions can the code execute in the browser console?