Salesforce CRT-600 Deluxe Study Guide with Online Test Engine
CRT-600 dumps review - Professional Quiz Study Materials
Salesforce CRT-600 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
| Topic 7 |
|
| Topic 8 |
|
NEW QUESTION 96
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. When the search string changes, enqueue the request within a setTimeout.
- 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. Store the timeId of the setTimeout last enqueued by the search string change handle.
- 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: A,D,E
NEW QUESTION 97
Refer to the code below:
01 let car1 = new promise((_, reject) =>
02 setTimeout(reject, 2000, "Car 1 crashed in"));
03 let car2 = new Promise(resolve => setTimeout(resolve, 1500, "Car 2
completed"));
04 let car3 = new Promise(resolve => setTimeout (resolve, 3000, "Car 3
Completed"));
05 Promise.race([car1, car2, car3])
06 .then(value => (
07 let result = $(value) the race. `;
08 ))
09 .catch( arr => (
10 console.log("Race is cancelled.", err);
11 ));
What is the value of result when Promise.race executes?
- A. Race is cancelled.
- B. Car 1 crashed in the race.
- C. Car 3 completed the race.
- D. Car 2 completed the race.
Answer: D
NEW QUESTION 98
Which statement accurately describes the behaviour of the async/ await keyworks ?
- A. The associated class contains some asynchronous functions.
- B. The associated sometimes returns a promise.
- C. The associated function will always return a promise
- D. The associated function can only be called via asynchronous methods
Answer: C
NEW QUESTION 99
Refer to the following code:
01 function Tiger(){
02 this.Type = 'Cat';
03 this.size = 'large';
04 }
05
06 let tony = new Tiger();
07 tony.roar = () =>{
08 console.log('They\'re great1');
09 };
10
11 function Lion(){
12 this.type = 'Cat';
13 this.size = 'large';
14 }
15
16 let leo = new Lion();
17 //Insert code here
18 leo.roar();
Which two statements could be inserted at line 17 to enable the function call on line 18?
Choose 2 answers.
- A. Leo.prototype.roar = () => { console.log('They\'re pretty good:'); };
- B. Object.assign(leo,Tiger);
- C. Leo.roar = () => { console.log('They\'re pretty good:'); };
- D. Object.assign(leo,tony);
Answer: C,D
NEW QUESTION 100
Refer to the code below:
Function Person(firstName, lastName, eyecolor) {
this.firstName =firstName;
this.lastName = lastName;
this.eyeColor = eyeColor;
}
Person.job = 'Developer';
const myFather = new Person('John', 'Doe');
console.log(myFather.job);
What is the output after the code executes?
- A. Developer
- B. Undefined
- C. ReferenceError: eyeColor is not defined
- D. ReferenceError: assignment to undeclared variable "Person"
Answer: B
NEW QUESTION 101
developer wants to use a module named universalContainersLib and them call functions from it.
How should a developer import every function from the module and then call the fuctions foo and bar ?
- A. import all from '/path/universalContaineraLib.js';
universalContainersLib.foo();
universalContainersLib.bar(); - B. import (foo, bar) from '/path/universalContainersLib.js';
foo();
bar(); - C. import * from '/path/universalContaineraLib.js';
universalContainersLib.foo();
universalContainersLib.bar(); - D. import * ad lib from '/path/universalContainersLib.js';
lib.foo();
lib.bar();
Answer: D
NEW QUESTION 102
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 implements Item{
- B. Class ClothingItem {
- C. Class ClothingItem extends Item {
- D. Class ClothingItem super Item {
Answer: C
NEW QUESTION 103
Refer to the code below:
let o = {
get js() {
let city1 = String("st. Louis");
let city2 = String(" New York");
return {
firstCity: city1.toLowerCase(),
secondCity: city2.toLowerCase(),
}
}
}
What value can a developer expect when referencing o.js.secondCity?
- A. ' new york '
- B. Undefined
- C. ' New York '
- D. An error
Answer: A
NEW QUESTION 104
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: C
NEW QUESTION 105
Refer to code below:
function Person() {
this.firstName = 'John';
}
Person.prototype ={
Job: x => 'Developer'
};
const myFather = new Person();
const result =myFather.firstName + ' ' + myFather.job();
What is the value of the result after line 10 executes?
- A. Error: myFather.job is not a function
- B. John undefined
- C. Undefined Developer
- D. John Developer
Answer: D
NEW QUESTION 106
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.
- A. Use the browser console to execute a script that prevents the load event to be fired.
- B. Use the browser to execute a script that removes all the element containing the class ad-library-item.
- C. Use the DOM inspector to remove all the elements containing the class ad-library-item.
- D. Use the DOM inspector to prevent the load event to be fired.
Answer: B
NEW QUESTION 107
developer publishes a new version of a package with new features that do not break backward compatibility. The previous version number was 1.1.3.
Following semantic versioning format, what should the new package version number be?
- A. 1.1.4
- B. 1.2.0
- C. 1.2.3
- D. 2.0.0
Answer: B
NEW QUESTION 108
Refer to code below:
Let first = 'who';
Let second = 'what';
Try{
Try{
Throw new error('Sad trombone');
}catch (err){
First ='Why';
}finally {
Second ='when';
} catch (err) {
Second ='Where';
}
What are the values for first and second once the code executes ?
- A. First is who and second is where
- B. First is why and second is where
- C. First is why and second is when
- D. First is Who and second is When
Answer: C
NEW QUESTION 109
The developer wants to test this code:
Const toNumber =(strOrNum) => strOrNum;
Which two tests are most accurate for this code?
Choose 2 answers
- A. console.assert(toNumber('-3') < 0);
- B. console.assert(toNumber('2') === 2);
- C. console.assert(Number.isNaN(toNumber()));
- D. console.assert(toNumber () === NaN);
Answer: A,B
NEW QUESTION 110
Refer to the code snippet:
Function getAvailabilityMessage(item) {
If (getAvailability(item)){
Var msg ="Username available";
}
Return msg;
}
A developer writes this code to return a message to user attempting to register a new username. If the username is available, variable.
What is the return value of msg hen getAvailabilityMessage ("newUserName" ) is executed and getAvailability("newUserName") returns false?
- A. "Msg is not defined"
- B. undefined
- C. "newUserName"
- D. "Username available"
Answer: B
NEW QUESTION 111
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?
- A. ws.on ('connect', ( ) => {
console.log('connected to client'); ws.on('error', (error) => { console.log('ERROR' , error); });
}); - B. ws.connect (( ) => {
console.log('connected to client'); }).catch((error) => { console.log('ERROR' , error); }}; - C. try{
ws.connect (( ) => {
console.log('connected to client'); });
} catch(error) { console.log('ERROR' , error); };
} - D. ws.on ('connect', ( ) => { console.log('connected to client'); }}; ws.on('error', (error) => { console.log('ERROR' , error); }};
Answer: D
NEW QUESTION 112
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(-3, 2 )) == -1);
- D. console.assert(sum3(0)) == 0);
Answer: B,C
NEW QUESTION 113
Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array.length; i++){
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of the array after the code executes?
- A. [1, 2, 3, 5]
- B. [1, 2, 3, 4, 4, 5, 4]
- C. [1, 2, 3, 4, 5, 4, 4]
- D. [1, 2, 3, 4, 5, 4]
Answer: D
NEW QUESTION 114
Refer to the code below:
01 const exec = (item, delay) =>{
02 new Promise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
06 );
07 return `parallel is done: $(result1) $(result2)$(result3)`;
08 }
}
}
Which two statements correctly execute the runParallel () function?
Choose 2 answers
- A. runParallel ( ). done(function(data){
return data;
}); - B. Async runParallel () .then(data);
- C. runParallel () .then(function(data)
return data - D. runParallel () .then(data);
Answer: A,C
NEW QUESTION 115
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?
- A. Only aPromise runs.
- B. aPromise and bPromise run in parallel.
- C. Neither aPromise or bPromise runs.
- D. aPromise and bPromise run sequentially.
Answer: C
NEW QUESTION 116
A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
<input type =" text" value="Hello" name ="input">
<button type ="button" >Display </button>
The developer wrote the javascript code below:
Const button = document.querySelector('button');
button.addEvenListener('click', () => (
Const input = document.querySelector('input');
console.log(input.getAttribute('value'));
When the user clicks the button, the output is always "Hello".
What needs to be done make this code work as expected?
- A. Replace line 04 with console.log(input .value);
- B. Replace line 02 with button.addEventListener("onclick", function() {
- C. Replace line 02 with button.addCallback("click", function() {
- D. Replace line 03 with const input = document.getElementByName('input');
Answer: A
NEW QUESTION 117
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. Window.m is assigned the correct object.
- B. The z variable 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 118
......
Exam Questions Answers Braindumps CRT-600 Exam Dumps PDF Questions: https://www.testsimulate.com/CRT-600-study-materials.html