CRT-600 Certification - The Ultimate Guide [Updated 2021]
CRT-600 Practice Exam and Study Guides - Verified By ActualCollection
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 88
Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?
- A. console.log(10/0);
- B. console.log(parseInt('two'));
- C. console.log(10/ Number('5'));
- D. console.log(10/ ''five);
Answer: C
NEW QUESTION 89
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.startsWith('N') ? 1: 0;
Return acc +sum - B. Const sum = curr.name.startsWith('N') ? 1: 0;
Return acc +sum - C. Const sum = curr.name.startsWIth('N') ? 1: 0;
Return curr+ sum - D. Const sum = curr.startsWIth('N') ? 1: 0;
Return curr+ sum
Answer: C
NEW QUESTION 90
Refer to the code below:
for(let number =2 ; number <= 5 ; number += 1 ) {
// insert code statement here
}
The developer needs to insert a code statement in the location shown. The code statement has these requirements:
1. Does require an import
2. Logs an error when the boolean statement evaluates to false
3. Works in both the browser and Node.js
Which meet the requirements?
- A. console.assert(number % 2 === 0);
- B. console.error(number % 2 === 0);
- C. console.debug(number % 2 === 0);
- D. assert (number % 2 === 0);
Answer: B
NEW QUESTION 91
A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm install.
Which two reasons could be possible explanations for this?
Choose 2 answers
- A. The developer missed the option --add when adding the dependency.
- B. The developer added the dependency as a dev dependency, and NODE_ENV is set to production.
- C. The developer missed the option --save when adding the dependency.
- D. The developer added the dependency as a dev dependency, and
NODE_ENV
Is set to production.
Answer: B,C,D
NEW QUESTION 92
Refer to the code below:
Const searchTest = 'Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?
- A. > 5 >undefined
- B. > 5 > -1
- C. > 5 > 0
- D. > true > false
Answer: A
Explanation:
NEW QUESTION 93
Refer to the following object:
const cat ={
firstName: 'Fancy',
lastName: ' Whiskers',
Get fullName() {
return this.firstName + ' ' + this.lastName;
}
};
How can a developer access the fullName property for cat?
- A. cat.fullName
- B. cat.fullName()
- C. cat.function.fullName()
- D. cat.get.fullName
Answer: A
NEW QUESTION 94
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: D
NEW QUESTION 95
Refer to HTML below:
<div id ="main">
<div id = " card-00">This card is smaller.</div>
<div id = "card-01">The width and height of this card is determined by its contents.</div>
</div>
Which expression outputs the screen width of the element with the ID card-01?
- A. document.getElementById(' card-01 ').getBoundingClientRest().width
- B. document.getElementById(' card-01 ').style.width
- C. document.getElementById(' card-01 ').width
- D. document.getElementById(' card-01 ').innerHTML.lenght*e
Answer: A
NEW QUESTION 96
Why would a developer specify a package.jason as a developed forge instead of a dependency ?
- A. It is only needed for local development and testing.
- B. Other required packages depend on it for development.
- C. It is required by the application in production.
- D. It should be bundled when the package is published.
Answer: A
NEW QUESTION 97
The developer has a function that prints "Hello" to an input name. To test this, thedeveloper created a function that returns "World". However the following snippet does not print " Hello World".
What can the developer do to change the code to print "Hello World" ?
- A. Change line 7 to ) () ;
- B. Change line 9 to sayHello(world) ();
- C. Change line 5 to function world ( ) {
- D. Change line 2 to console.log('Hello' , name() );
Answer: D
NEW QUESTION 98
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(3);
console.assert ( res === ' buzz ' ) - B. let res = fizzbuzz(5);
console.assert ( res === ' ' ); - C. let res = fizzbuzz(15);
console.assert ( res === ' fizzbuzz ' ) - D. let res = fizzbuzz(Infinity);
console.assert ( res === ' ' )
Answer: A,C,D
NEW QUESTION 99
Given the following code:
Let x =('15' + 10)*2;
What is the value of a?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: A
NEW QUESTION 100
A developer implements a function that adds a few values.
Function sum(num) {
If (num == undefined) {
Num =0;
}
Return function( num2, num3){
If (num3 === undefined) {
Num3 =0 ;
}
Return num + num2 + num3;
}
}
Which three options can the developer invoke for this function to get a return value of 10 ?
Choose 3 answers
- A. sum() (5, 5)
- B. sum(5)(5)
- C. sum(10) ()
- D. Sum (5, 5) ()
- E. Sum () (20)
Answer: A,B
NEW QUESTION 101
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 102
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(' quick ') !== -1;
- C. sampleText.includes(' fox ');
- D. sampleText.includes('fox');
- E. sampleText.includes(' quick ', 4);
Answer: B,C,E
NEW QUESTION 103
Which statement phrases successfully?
- A. JSON.parse ( " foo " );
- B. JSON.parse( " ' foo ' " );
- C. JSON.parse(' " foo " ');
- D. JSON.parse ( ' foo ' );
Answer: C
NEW QUESTION 104
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 105
Refer to the code below:
let sayHello = () => {
console.log ('Hello, world!');
};
Which code executes sayHello once, two minutes from now?
- A. setInterval(sayHello, 12000);
- B. delay(sayHello, 12000);
- C. setTimeout(sayHello, 12000);
- D. setTimeout(sayHello(), 12000);
Answer: C
NEW QUESTION 106
Refer to HTML below:
<p> The current status of an Order: <span id ="status"> In Progress </span> </p>.
Which JavaScript statement changes the text 'In Progress' to 'Completed' ?
- A. document.getElementById("status").Value = 'Completed' ;
- B. document.getElementById("status").innerHTML = 'Completed' ;
- C. document.getElementById(".status").innerHTML = 'Completed' ;
- D. document.getElementById("#status").innerHTML = 'Completed' ;
Answer: B
NEW QUESTION 107
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 02 assertion fails
- D. The line 05 assertion passes.
Answer: A,B
NEW QUESTION 108
A test has a dependency on database.query. During the test the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called and the arguments used each time.
Which two test approaches describe the requirement?
Choose 2 answers
- A. Mocking
- B. White box
- C. Black box
- D. Integration
Answer: A,B
NEW QUESTION 109
Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?
- A. JSON.stringify and JSON.parse
- B. JSON.encode and JSON.decode
- C. JSON.serialize and JSON.deserialize
- D. JSON.parse and JSON.deserialize
Answer: A
NEW QUESTION 110
Which three options show valid methods for creating a fat arrow function?
Choose 3 answers
- A. X,y,z => ( console.log(' executed ') ;)
- B. (x,y,z) => ( console.log(' executed ') ;)
- C. ( ) => ( console.log(' executed ') ;)
- D. [ ] => ( console.log(' executed ') ;)
- E. x => ( console.log(' executed ') ; )
Answer: B,E
NEW QUESTION 111
Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?
- A. D

- B. B

- C. C

- D. A

Answer: D
NEW QUESTION 112
Which two console logs outputs NaN ?
Choose 2 answers
- A. console.log(10/0);
- B. console.log(10/ ''five);
- C. console.log(parseInt('two'));
- D. console.log(10/ Number('5'));
Answer: B,C
NEW QUESTION 113
......
Ultimate Guide to the CRT-600 - Latest Edition Available Now: https://www.actualcollection.com/CRT-600-exam-questions.html