Free CRT-600 Exam Braindumps (page: 17)

Page 16 of 57

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.

  1. Use the DOM inspector to prevent the load event to be fired.
  2. Use the browser to execute a script that removes all the element containing the class ad-library- item.
  3. Use the DOM inspector to remove all the elements containing the class ad-library-item.
  4. Use the browser console to execute a script that prevents the load event to be fired.

Answer(s): C



Which code statement correctly retrieves and returns an object from localStorage?

  1. const retrieveFromLocalStorage = () =>{
    return JSON.stringify(window.localStorage.getItem(storageKey)); }
  2. const retrieveFromLocalStorage = (storageKey) =>{
    return window.localStorage.getItem(storageKey);
    }
  3. const retrieveFromLocalStorage = (storageKey) =>{
    return JSON.parse(window.localStorage.getItem(storageKey)); }
  4. const retrieveFromLocalStorage = (storageKey) =>{
    return window.localStorage[storageKey];
    }

Answer(s): C



is below:

<input type="file" onchange="previewFile()">
<img src="" height="200" alt="Image Preview..."/>
The JavaScript portion is:
01 function previewFile(){
02 const preview = document.querySelector(`img');
03 const file = document.querySelector(`input[type=file]').files[0]; 04 //line 4 code
05 reader.addEventListener("load", () => {
06 preview.src = reader.result;
07 },false);
08 //line 8 code
09 }

In lines 04 and 08, which code allows the user to select an image from their local computer , and to display the image in the browser?

  1. 04 const reader = new File();
    08 if (file) URL.createObjectURL(file);
  2. 04 const reader = new FileReader();
    08 if (file) URL.createObjectURL(file);
  3. 04 const reader = new File();
    08 if (file) reader.readAsDataURL(file);
  4. 04 const reader = new FileReader();
    08 if (file) reader.readAsDataURL(file);

Answer(s): D



A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{`Item status is: %s', status}; 03 }
Which three console logging methods allow the use of string substitution in line 02?

  1. Assert
  2. Log
  3. Message
  4. Info
  5. Error

Answer(s): B,D,E






Post your Comments and Discuss Salesforce CRT-600 exam with other Community members:

CRT-600 Discussions & Posts