Question 46

Which code statement correctly retrieves and return an object from localStorage?
A)

B)

C)

D)
  • Question 47

    Refer to the HTML below:

    Which JavaScript statement results in changing ''Tony'' to ''Mr. T. ''?
  • Question 48

    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 49

    A developer has a web server running with Node.js. The command to start the web server is node server.js.
    The web server started having
    latency issues. Instead of a one second turnaround for web requests, the developer now sees a five second turnaround.
    Which command can the web developer run to see what the module is doing during the latency period?
  • Question 50

    A developer is setting up a new Node.js server with a client library that is built using events and callbacks.
    The library:
    * Will establish a web socket connection and handle receipt of messages to the server
    * Will be imported with require, and made available with a variable called we.
    The developer also wants to add error logging if a connection fails.
    Given this info, which code segment shows the correct way to set up a client with two events that listen at execution time?