Question 116

Refer to the code below:
Const searchTest = 'Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?
  • Question 117

    Refer to the code snippet:

    What is the value of array after the code executes?
  • Question 118

    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?
  • Question 119

    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 number in the array, The test passes:
    Let res = sum2([1, 2, 3 ]) ;
    console.assert(res === 6 );
    Res = sum3([ 1, 2, 3, 4]);
    console.assert(res=== 6);
    A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:
    Which two results occur when running the test on the updated sum3 function ?
    Choose 2 answers
  • Question 120

    Teams at Universal Containers (CU) work on multiple JavaScript projects at the same time. UC us thinking about reusability and how each team can benefit from the work of others.
    Going open-source or public is not an option at this time.
    Which option is available to UC with npm?