Pass Your Salesforce Exam with CRT-600 Exam Dumps (Updated 160 Questions) [Q92-Q107]

Share

Pass Your Salesforce Exam with CRT-600 Exam Dumps (Updated 160 Questions)

CRT-600 Exam Dumps - Salesforce Practice Test Questions


Salesforce CRT-600 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Type Conversion (explicit and implicit)
  • Working with JSON
  • Data Types and Variables
Topic 2
  • JavaScript Basics
  • Working with Strings, Numbers, and Dates
Topic 3
  • Creating Objects, Object Prototypes, Defining Functions
Topic 4
  • Browser and Events
  • Document Object Model
  • Browser Dev Tools
Topic 5
  • Server Side JavaScript Debugging in Node.js, Node.js Libraries
Topic 6
  • Debugging and Error Handling
  • Throwing and Catching Errors
  • Working with the Console

 

NEW QUESTION 92
A developer receives a comment from the Tech Lead that the code given below has error:
const monthName = 'July';
const year = 2019;
if(year === 2019) {
monthName = 'June';
}
Which line edit should be made to make this code run?

  • A. 01 let monthName ='July';
  • B. 03 if (year == 2019) {
  • C. 02 const year = 2020;
  • D. 02 let year =2019;

Answer: A

 

NEW QUESTION 93
A developer is creating a simple webpage with a button. When a user clicks this button for the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
01 function listen(event) {
02 alert ( 'Hey! I am John Doe') ;
03 button.addEventListener ('click', listen);
Which two code lines make this code work as required?
Choose 2 answers

  • A. On line 04, use event.stopPropagation ( ),
  • B. On line 02, use event.first to test if it is the first execution.
  • C. On line 06, add an option called once to button.addEventListener().
  • D. On line 04, use button.removeEventListener(' click" , listen);

Answer: C,D

 

NEW QUESTION 94
Refer to the following array:
Let arr = [ 1,2, 3, 4, 5];
Which three options result in x evaluating as [3, 4, 5] ?
Choose 3 answers.

  • A. Let x = arr.slice(2,3);
  • B. Let x= arr.slice(2);
  • C. Let x= arr.filter (( a) => (a<2));
  • D. Let x= arr.filter((a) => ( return a>2 ));
  • E. Let x= arr.splice(2,3);

Answer: B,D,E

 

NEW QUESTION 95
A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every time the code is executed. The developer needs to find what is missing in the code below.
Const sumFunction = arr => {
Return arr.reduce((result, current) => {
//
Result += current;
//
), 10);
);
Which option makes the code work as expected?

  • A. Replace line 04 with result = result +current;
  • B. Replace line 02 with return arr.map(( result, current) => (
  • C. Replace line 05 with return result;
  • D. Replace line 03 with if(arr.length == 0 ) ( return 0; )

Answer: C

 

NEW QUESTION 96
Refer to the code below:
Let foodMenu1 = ['pizza', 'burger', 'French fries'];
Let finalMenu = foodMenu1;
finalMenu.push('Garlic bread');
What is the value of foodMenu1 after the code executes?

  • A. [ 'Garlic bread']
  • B. [ 'Garlic bread' , 'pizza','Burger', 'French fires' ]
  • C. [ 'pizza','Burger', 'French fires']
  • D. [ 'pizza','Burger', 'French fires', 'Garlic bread']

Answer: C

 

NEW QUESTION 97
Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?

  • A. JSON.parse and JSON.deserialize
  • B. JSON.stringify and JSON.parse
  • C. JSON.serialize and JSON.deserialize
  • D. JSON.encode and JSON.decode

Answer: B

 

NEW QUESTION 98
A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a good experience, a script named personaliseContext needs to be executed when the webpage is fully loaded (HTML content and all related files ), in order to do some custom initialization.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

  • A. Document.addEventListener('''DOMContextLoaded' , personalizeWebsiteContext);
  • B. window.addEventListener('onload', personalizeWebsiteContext);
  • C. document.addEventListener(''onDOMContextLoaded', personalizeWebsiteContext);
  • D. window.addEventListener('load',personalizeWebsiteContext);

Answer: D

 

NEW QUESTION 99
A developer is debugging a web server that uses Node.js The server hits a runtimeerror 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 he 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 breakdown is hit ?

  • A. Node --inspect index.js
  • B. Node --inspect-brk index.js
  • C. node -i index.js
  • D. Node inspect index.js

Answer: A

 

NEW QUESTION 100
Refer to the code below:
console.log(''start);
Promise.resolve('Success') .then(function(value){
console.log('Success');
});
console.log('End');
What is the output after the code executes successfully?

  • A. Start
    Success
    End
  • B. Start
    End
    Success
  • C. End
    Start
    Success
  • D. Success
    Start
    End

Answer: B

 

NEW QUESTION 101
Refer to the code below:
<html lang="en">
<table onclick="console.log(Table log');">
<tr id="row1">
<td>Click me!</td>
</tr>
<table>
<script>
function printMessage(event) {
console.log('Row log');
}
Let elem = document.getElementById('row1');
elem.addEventListener('click', printMessage, false);
</script>
</html>
Which code change should be made for the console to log only Row log when 'Click me! ' is clicked?

  • A. Add event.removeEventListener(); to window.onLoad event handler.
  • B. Add event.stopPropagation(); to printMessage function.
  • C. Add event.removeEventListener(); toprintMessage function.
  • D. Add.event.stopPropagation(); to window.onLoad event handler.

Answer: B

 

NEW QUESTION 102
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?

  • A. 04 const reader = new File();
    08 if (file) reader.readAsDataURL(file);
  • B. 04 const reader = new FileReader();
    08 if (file) URL.createObjectURL(file);
  • C. 04 const reader = new File();
    08 if (file) URL.createObjectURL(file);
  • D. 04 const reader = new FileReader();
    08 if (file) reader.readAsDataURL(file);

Answer: D

 

NEW QUESTION 103
Teams at Universal Containers (UC) work on multiple JavaScript projects at the same time.
UC is 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?

  • A. Private registries are not supported by npm, but packages can be installed via URL.
  • B. Private packages are not supported, but they can use another package manager like yarn.
  • C. Private registries are not supported by npm, but packages can be installed via git.
  • D. Private packages can be scored, and scopes can be associated to a private registries.

Answer: D

 

NEW QUESTION 104
Universal Containers (UC) notices that its application that allows users to search for accounts makes a network request each time a key is pressed. This results in too many requests for the server to handle.
* Address this problem, UC decides to implement a debounce function on string change handler.
What are three key steps to implement this debounce function?
Choose 3 answers:

  • A. Store the timeId of the setTimeout last enqueued by the search string change handle.
  • B. If there is an existing setTimeout and the search string changes, cancel the existing setTimeout using the persisted timerId and replace it with a new setTimeout.
  • C. When the search string changes, enqueue the request within a setTimeout.
  • D. If there is an existing setTimeout and the search string change, allow the existing setTimeout to finish, and do not enqueue a new setTimeout.
  • E. Ensure that the network request has the property debounce set to true.

Answer: C,D,E

 

NEW QUESTION 105
Given HTML below:
<div>
<div id ="row-uc"> Universal Container</div>
<div id ="row-aa">Applied Shipping</div>
<div id ="row-bt"> Burlington Textiles </div>
</div>
Which statement adds the priority = account CSS class to the universal COntainers row ?

  • A. Document .querySelector('#row-uc').classList.add('priority-account');
  • B. Document .querySelector('#row-uc').classes.push('priority-account');
  • C. Document .queryElementById('row-uc').addclass('priority-account');
  • D. Document .querySelectorALL('#row-uc').classList.add('priority-account');

Answer: C

 

NEW QUESTION 106
Cloud Kicks has a class to represent items for sale in an online store, as shown below:
Class Item{
constructor (name, price){
this.name = name;
this.price = price;
}
formattedPrice(){
return 's' + String(this.price);}}
A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.
Which line of code properly declares the clothingItem class such that it inherits from Item?

  • A. Class ClothingItem extends Item {
  • B. Class ClothingItem {
  • C. Class ClothingItem implements Item{
  • D. Class ClothingItem super Item {

Answer: A

 

NEW QUESTION 107
......

Pass Your CRT-600 Exam Easily with Accurate PDF Questions: https://freedumps.actual4exams.com/CRT-600-real-braindumps.html