Full CRT-600 Practice Test and 160 unique questions with explanations waiting just for you! [Q43-Q65]

Share

Full CRT-600 Practice Test and 160 unique questions with explanations waiting just for you!

Salesforce Certified Dumps CRT-600 Exam for Full Questions - Exam Study Guide

NEW QUESTION 43
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 turn around 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?

  • A. DEBUG =true node server.js
  • B. DEBUG = http, https node server.js
  • C. NODE_DEBUG =true node server.js
  • D. NODE_DEBUG =http, https node server.js

Answer: A

 

NEW QUESTION 44
A developer needs to test this function:
01 const sum3 = (arr) => (
02 if (!arr.length) return 0,
03 if (arr.length === 1) return arr[0],
04 if (arr.length === 2) return arr[0] + arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function?
Choose 2 answers

  • A. console.assert(sum3('hello', 2, 3, 4)) === NaN);
  • B. console.assert(sum3(1, '2')) == 12);
  • C. console.assert(sum3(0)) == 0);
  • D. console.assert(sum3(-3, 2 )) == -1);

Answer: B,D

 

NEW QUESTION 45
Considering type coercion, what does the following expression evaluate to?
True + '13' + NaN

  • A. ' true13 '
  • B. ' true13NaN '
  • C. ' 113Nan '
  • D. 0

Answer: B

 

NEW QUESTION 46
A developer is asked to fix some bugs reported by users. To do that, the developer adds a breakpoint for debugging.
Function Car (maxSpeed, color){
This.maxspeed =masSpeed;
This.color = color;
Let carSpeed = document.getElementById(' CarSpeed');
Debugger;
Let fourWheels =new Car (carSpeed.value, 'red');
When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console ?
Choose 2 answers:

  • A. The information stored in the window.localStorage property
  • B. The values of the carSpeed and fourWheels variables
  • C. The style, event listeners and other attributes applied to the carSpeed DOM element
  • D. A variable displaying the number of instances created for the Car Object.

Answer: A,C

 

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

  • A. const retrieveFromLocalStorage = (storageKey) =>{
    return window.localStorage[storageKey];
    }
  • B. const retrieveFromLocalStorage = () =>{
    return JSON.stringify(window.localStorage.getItem(storageKey));
    }
  • C. const retrieveFromLocalStorage = (storageKey) =>{
    return JSON.parse(window.localStorage.getItem(storageKey));
    }
  • D. const retrieveFromLocalStorage = (storageKey) =>{
    return window.localStorage.getItem(storageKey);
    }

Answer: C

 

NEW QUESTION 48
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. If there is an existing setTimeout and the search string change, allow the existing setTimeout to finish, and do not enqueue a new setTimeout.
  • B. When the search string changes, enqueue the request within a setTimeout.
  • C. Store the timeId of the setTimeout last enqueued by the search string change handle.
  • D. Ensure that the network request has the property debounce set to true.
  • E. 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.

Answer: A,B,D

 

NEW QUESTION 49
GIven a value, which three options can a developer use to detect if the value is NaN?
Choose 3 answers !

  • A. Number.isNaN(value)
  • B. Object.is(value, NaN)
  • C. value === Number.NaN
  • D. value == NaN
  • E. value ! == value

Answer: A,D

 

NEW QUESTION 50
A developer wants to iterate through an array of objects and count the objects and count the objects whose property value, name, starts with the letter N.
Const arrObj = [{"name" : "Zach"} , {"name" : "Kate"},{"name" : "Alise"},{"name" : "Bob"},{"name" :
"Natham"},{"name" : "nathaniel"}
Refer to the code snippet below:
01 arrObj.reduce(( acc, curr) => {
02 //missing line 02
02 //missing line 03
04 ). 0);
Which missing lines 02 and 03 return the correct count?

  • A. Const sum = curr.name.startsWith('N') ? 1: 0;
    Return acc +sum
  • B. Const sum = curr.name.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • C. Const sum = curr.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • D. Const sum = curr.startsWith('N') ? 1: 0;
    Return acc +sum

Answer: A

 

NEW QUESTION 51
Refer to the code below:

Line 05 causes an error.
What are the values of greeting and salutation once code completes?

  • A. Greeting is Goodbye and salutation is I say Hello.
  • B. Greeting is Goodbye and salutation is Hello, Hello.
  • C. Greeting is Hello and salutation is Hello, Hello.
  • D. Greeting is Hello and salutation is I say hello.

Answer: C

 

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

  • A. Server.error ((server) => {
    console.log('ERROR', error);
    });
  • B. Try{
    server.start();
    } catch(error) {
    console.log('ERROR', error);
    }
  • C. Server.catch ((server) => {
    console.log('ERROR', error);
    });
  • D. Server.on ('error', (error) => {
    console.log('ERROR', error);
    });

Answer: D

 

NEW QUESTION 53
A developer uses a parsed JSON string to work with user information as in the block below:
01 const userInformation ={
02 " id " : "user-01",
03 "email" : "[email protected]",
04 "age" : 25
Which two options access the email attribute in the object?
Choose 2 answers

  • A. userInformation.email
  • B. userInformation("email")
  • C. userInformation.get("email")
  • D. userInformation(email)

Answer: A,B

 

NEW QUESTION 54
A developer wants to set up a secure web server with Node.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server?

  • A. const https =require('https');
  • B. const server =require('secure-server');
  • C. const tls = require('tls');
  • D. const http =require('http');

Answer: A

 

NEW QUESTION 55
A developer wants to create an object from a function in the browser using the code below:
Function Monster() { this.name = 'hello' };
Const z = Monster();
What happens due to lack of the new keyword on line 02?

  • A. The z variable is assigned the correct object.
  • B. Window.m is assigned the correct object.
  • C. The z variable is assigned the correct object but this.name remains undefined.
  • D. Window.name is assigned to 'hello' and the variable z remains undefined.

Answer: D

 

NEW QUESTION 56
Refer to code below:
Let a ='a';
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?

  • A. ReferenceError: b is not defined
  • B. Undefined
  • C. A
  • D. Null

Answer: B

 

NEW QUESTION 57
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

  • A. The line 05 assertion fails.
  • B. The line 02 assertion passes.
  • C. The line 05 assertion passes.
  • D. The line 02 assertion fails

Answer: A,B

 

NEW QUESTION 58
Refer to the following code:
Let sampleText = 'The quick brown fox jumps';
A developer needs to determine if a certain substring is part of a string.
Which three expressions return true for the given substring ?
Choose 3 answers

  • A. sampleText.includes(' quick ', 4);
  • B. sampleText.includes(' Fox ', 3)
  • C. sampleText.includes(' quick ') !== -1;
  • D. sampleText.includes(' fox ');
  • E. sampleText.includes('fox');

Answer: A,C,D

 

NEW QUESTION 59
A developer is leading the creation of a new browser application that will serve a single page application. The team wants to use a new web framework Minimalsit.js. The Lead developer wants to advocate for a more seasoned web framework that already has a community around it.
Which two frameworks should the lead developer advocate for?
Choose 2 answers

  • A. Koa
  • B. Vue
  • C. Express
  • D. Angular

Answer: C,D

 

NEW QUESTION 60
Which code statement below correctly persists an objects in local Storage ?

  • A. const setLocalStorage = ( jsObject) => {
    window.localStorage.setItem(jsObject);
    }
  • B. const setLocalStorage = ( jsObject) => {
    window.localStorage.connectObject(jsObject));
    }
  • C. const setLocalStorage = (storageKey, jsObject) => {
    window.localStorage.setItem(storageKey, JSON.stringify(jsObject));
    }
  • D. const setLocalStorage = (storageKey, jsObject) => {
    window.localStorage.persist(storageKey, jsObject);
    }

Answer: C

Explanation:

 

NEW QUESTION 61
A class was written to represent items for purchase in an online store, and a second class Representing items that are on sale at a discounted price. THe constructor sets the name to the first value passed in. The pseudocode is below:
Class Item {
constructor(name, price) {
... // Constructor Implementation
}
}
Class SaleItem extends Item {
constructor (name, price, discount) {
...//Constructor Implementation
}
}
There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.
Let regItem =new Item('Scarf', 55);
Let saleItem = new SaleItem('Shirt' 80, -1);
Item.prototype.description = function () { return 'This is a ' + this.name; console.log(regItem.description()); console.log(saleItem.description()); SaleItem.prototype.description = function () { return 'This is a discounted ' + this.name; } console.log(regItem.description()); console.log(saleItem.description()); What is the output when executing the code above ?

  • A. This is aScarf
    Uncaught TypeError: saleItem.description is not a function
    This is a Shirt
    This is a did counted Shirt
  • B. This is a Scarf
    This is a Shirt
    This is a Scarf
    This is a discounted Shirt
  • C. This is a Scarf
    This is a Shirt
    This is a discounted Scarf
    This is a discounted Shirt
  • D. This is a Scarf
    Uncaught TypeError: saleItem.description is not a function
    This is aScarf
    This is a discounted Shirt

Answer: B

 

NEW QUESTION 62
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 02, use event.first to test if it is the first execution.
  • B. On line 04, use event.stopPropagation ( ),
  • 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 63
Refer to the expression below:
Let x = ('1' + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?

  • A. Let x = ('1' + 2) == ( 6 * 2);
  • B. Let x = (1 + 2 ) == ( 6 / 2);
  • C. Let x = ('1' + ' 2') == ( 6 * 2);
  • D. Let x = (1 + 2) == ( '6' / 2);

Answer: A

 

NEW QUESTION 64
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers

  • A. IIFEs
  • B. localStorage.
  • C. Cookies
  • D. indexedDB
  • E. Global variables

Answer: A,B,D

 

NEW QUESTION 65
......

Authentic Best resources for CRT-600 Online Practice Exam: https://www.passcollection.com/CRT-600_real-exams.html

Get the superior quality CRT-600 Dumps Questions from PassCollection: https://drive.google.com/open?id=1Wi8GBmXOaQ6HZRQRojEkOr2wrGp4r-Xj