[UPDATED 2022] Salesforce CRT-600 Questions Prepare with Free Demo of PDF
NEW 2022 Certification Sample Questions CRT-600 Dumps & Practice Exam
Salesforce CRT-600 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
| Topic 7 |
|
NEW QUESTION 43
Which three options show valid methods for creating a fat arrow function?
Choose 3 answers
- A. X,y,z => ( console.log(' executed ') ;)
- B. [ ] => ( console.log(' executed ') ;)
- C. x => ( console.log(' executed ') ; )
- D. ( ) => ( console.log(' executed ') ;)
- E. (x,y,z) => ( console.log(' executed ') ;)
Answer: C,E
NEW QUESTION 44
Given the following code:
Let x =null;
console.log(typeof x);
What is the output of the line 02?
- A. "Null"
- B. "Object"
- C. "X"
- D. "undefined"
Answer: B
NEW QUESTION 45
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 a Scarf
Uncaught TypeError: saleItem.description is not a function
This is aScarf
This is a discounted Shirt - B. This is a Scarf
This is a Shirt
This is a Scarf
This is a discounted Shirt - C. This is aScarf
Uncaught TypeError: saleItem.description is not a function
This is a Shirt
This is a did counted Shirt - D. This is a Scarf
This is a Shirt
This is a discounted Scarf
This is a discounted Shirt
Answer: B
NEW QUESTION 46
In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default.
Which two methods are used to address this ?
Choose 2 answers
- A. Assign variables to the global object.
- B. Create a new window object in the root file.
- C. Use the document object instead of the window object.
- D. Assign variables to module.exports and require them as needed.
Answer: A
NEW QUESTION 47
Given the code below:
const copy = JSON.stringify([ new String(' false '), new Bollean( false ), undefined ]); What is the value of copy?
- A. -- [ \"false\" ,false, null ]--
- B. -- [ \"false\" , { } ]--
- C. -- [ \"false\" , false, undefined ]--
- D. -- [ false, { } ]--
Answer: A
NEW QUESTION 48
Which code statement below correctly persists an objects in local Storage ?
- A. const setLocalStorage = (storageKey, jsObject) => {
window.localStorage.persist(storageKey, jsObject);
} - B. const setLocalStorage = ( jsObject) => {
window.localStorage.connectObject(jsObject));
} - C. const setLocalStorage = (storageKey, jsObject) => {
window.localStorage.setItem(storageKey, JSON.stringify(jsObject));
} - D. const setLocalStorage = ( jsObject) => {
window.localStorage.setItem(jsObject);
}
Answer: C
Explanation:
NEW QUESTION 49
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(data);
- D. runParallel () .then(function(data)
return da
Answer: A,D
NEW QUESTION 50
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.addCallback("click", function() {
- C. Replace line 03 with const input = document.getElementByName('input');
- D. Replace line 02 with button.addEventListener("onclick", function() {
Answer: A
NEW QUESTION 51
At Universal Containers, every team has its own way of copying JavaScript objects. The code Snippet shows an implementation from one team:
Function Person() {
this.firstName = "John";
this.lastName = 'Doe';
This.name =() => (
console.log('Hello $(this.firstName) $(this.firstName)');
)}
Const john = new Person ();
Const dan = JSON.parse(JSON.stringify(john));
dan.firstName ='Dan';
dan.name();
What is the Output of the code execution?
- A. Hello John DOe
- B. TypeError: dan.name is not a function
- C. Hello Dan Doe
- D. TypeError: Assignment to constant variable.
Answer: B
NEW QUESTION 52
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 53
Refer to following code:
class Vehicle {
constructor(plate) {
This.plate =plate;
}
}
Class Truck extends Vehicle {
constructor(plate, weight) {
//Missing code
This.weight = weight;
}
displayWeight() {
console.log('The truck ${this.plate} has a weight of ${this.weight} lb.');}} Let myTruck = new Truck('123AB', 5000); myTruck.displayWeight(); Which statement should be added to line 09 for the code to display 'The truck 123AB has a weight of 5000lb.'?
- A. This.plate =plate;
- B. Super.plate =plate;
- C. super(plate);
- D. Vehicle.plate = plate;
Answer: C
NEW QUESTION 54
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.get("email")
- C. userInformation.email
- D. userInformation(email)
Answer: A,C
NEW QUESTION 55
Refer to following code block:
Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,];
Let output =0;
For (let num of array){
if (output >0){
Break;
}
if(num % 2 == 0){
Continue;
}
Output +=num;
What is the value of output after the code executes?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
NEW QUESTION 56
A developer wrote a fizzbuzz function that when passed in a number, returns the following:
* 'Fizz' if the number is divisible by 3.
* 'Buzz' if the number is divisible by 5.
* 'Fizzbuzz' if the number is divisible by both 3 and 5.
* Empty string if the number is divisible by neither 3 or 5.
Which two test cases will properly test scenarios for the fizzbuzz function?
Choose 2 answers
- A. let res = fizzbuzz(5);
console.assert ( res === ' ' ); - B. let res = fizzbuzz(15);
console.assert ( res === ' fizzbuzz ' ) - C. let res = fizzbuzz(3);
console.assert ( res === ' buzz ' ) - D. let res = fizzbuzz(Infinity);
console.assert ( res === ' ' )
Answer: B,C,D
NEW QUESTION 57
Refer to the code below:
new Promise((resolve, reject) => {
const fraction = Math.random();
if( fraction >0.5) reject("fraction > 0.5, " + fraction);
resolve(fraction);
})
.then(() =>console.log("resolved"))
.catch((error) => console.error(error))
.finally(() => console.log(" when am I called?"));
When does Promise.finally on line 08 get called?
- A. When rejected
- B. When resolved or rejected
- C. WHen resolved
- D. When resolved and settled
Answer: B
NEW QUESTION 58
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 59
A developer is working on an ecommerce website where the delivery date is dynamically calculated based on the current day. The code line below is responsible for this calculation.
Const deliveryDate = new Date ();
Due to changes in the business requirements, the delivery date must now be today's date + 9 days.
Which code meets this new requirement?
- A. deliveryDate.date = new Date(+9) ;
- B. deliveryDate.setDate( Date.current () + 9);
- C. deliveryDate.setDate(( new Date ( )).getDate () +9);
- D. deliveryDate.date = Date.current () + 9;
Answer: C
NEW QUESTION 60
Refer to the code below:
let sayHello = () => {
console.log ('Hello, world!');
};
Which code executes sayHello once, two minutes from now?
- A. setTimeout(sayHello, 12000);
- B. setTimeout(sayHello(), 12000);
- C. delay(sayHello, 12000);
- D. setInterval(sayHello, 12000);
Answer: A
NEW QUESTION 61
A developer has the function, shown below, that is called when a page loads.
function onload() {
console.log("Page has loaded!");
}
Where can the developer see the log statement after loading the page in the browser?
- A. On the webpage.
- B. Browser performance toots
- C. Terminal running the web server.
- D. Browser javaScript console
Answer: D
NEW QUESTION 62
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. Try{
server.start();
} catch(error) {
console.log('ERROR', error);
} - B. Server.error ((server) => {
console.log('ERROR', error);
}); - C. Server.on ('error', (error) => {
console.log('ERROR', error);
}); - D. Server.catch ((server) => {
console.log('ERROR', error);
});
Answer: C
NEW QUESTION 63
Given the code below:
const delay = sync delay => {
Return new Promise((resolve, reject) => {
setTimeout (resolve, delay);});};
const callDelay =async () =>{
const yup =await delay(1000);
console.log(1);
What is logged to the console?
- A. 2 1 3
- B. 1 2 3
- C. 2 3 1
- D. 1 3 2
Answer: C
NEW QUESTION 64
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(' Fox ', 3)
- B. sampleText.includes('fox');
- C. sampleText.includes(' quick ') !== -1;
- D. sampleText.includes(' quick ', 4);
- E. sampleText.includes(' fox ');
Answer: C,D,E
NEW QUESTION 65
A developer implements and calls the following code when an application state change occurs:
Const onStateChange =innerPageState) => {
window.history.pushState(newPageState, ' ', null);
}
If the back button is clicked after this method is executed, what can a developer expect?
- A. A popstate event is fired with a state property that details the application's last state.
- B. A navigate event is fired with a state property that details the previous application state.
- C. The page reloads and all Javascript is reinitialized.
- D. The page is navigated away from and the previous page in the browser's history is loaded.
Answer: D
NEW QUESTION 66
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. An error
- C. Undefined
- D. ' New York '
Answer: A
NEW QUESTION 67
......
CRT-600 Deluxe Study Guide with Online Test Engine: https://protechtraining.actualtestsit.com/Salesforce/CRT-600-exam-prep-dumps.html