Salesforce CRT-600 Test Engine Dumps Training With 160 Questions [Q56-Q72]

Share

Salesforce CRT-600 Test Engine Dumps Training With 160 Questions

CRT-600 Questions Pass on Your First Attempt Dumps for Salesforce Certified Certified


Salesforce CRT-600 Exam Syllabus Topics:

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

 

NEW QUESTION 56
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 02 with return arr.map(( result, current) => (
  • B. Replace line 05 with return result;
  • C. Replace line 03 with if(arr.length == 0 ) ( return 0; )
  • D. Replace line 04 with result = result +current;

Answer: B

 

NEW QUESTION 57
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 58
Given the code below:
01 function GameConsole (name) {
02 this.name = name;
03 }
04
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ` $(this.name) is loading a game : $(gamename) ...`);
07 )
08 function Console 16 Bit (name) {
09 GameConsole.call(this, name) ;
10 }
11 Console16bit.prototype = Object.create ( GameConsole.prototype) ;
12 //insert code here
13 console.log( ` $(this.name) is loading a cartridge game : $(gamename) ...`);
14 }
15 const console16bit = new Console16bit(' SNEGeneziz ');
16 console16bit.load(' Super Nonic 3x Force ');
What should a developer insert at line 15 to output the following message using the method ?
> SNEGeneziz is loading a cartridge game: Super Monic 3x Force . . .

  • A. Console16bit.prototype.load = function(gamename) {
  • B. Console16bit.prototype.load(gamename) = function() {
  • C. Console16bit.prototype.load(gamename) {
  • D. Console16bit = Object.create(GameConsole.prototype).load = function
    (gamename) {

Answer: A

 

NEW QUESTION 59
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 60
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 61
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 62
Refer to the code below:
Let str = 'javascript';
Str[0] = 'J';
Str[4] = 'S';
After changing the string index values, the value of str is 'javascript'. What is the reason for this value:

  • A. Non-primitive values are mutable.
  • B. Primitive values are mutable.
  • C. Non-primitive values are immutable.
  • D. Primitive values are immutable.

Answer: D

 

NEW QUESTION 63
A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code:
function calculateBill ( items ) {
let total = 0;
total += findSubTotal(items);
total += addTax(total);
total += addTip(total);
return total;
}
Which option allows the developer to step into each function execution within calculateBill?

  • A. Wrapping findSubtotal in a console.log() method.
  • B. Using the debugger command on line 03
  • C. Using the debugger command on line 05.
  • D. Calling the console.trace (total) method on line 03.

Answer: C

 

NEW QUESTION 64
A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{'Item status is: %s', status};
03 }
Which three console logging methods allow the use of string substitution in line 02?

  • A. Assert
  • B. Info
  • C. Log
  • D. Error
  • E. Message

Answer: A,B

 

NEW QUESTION 65
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 66
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. 03 if (year == 2019) {
  • B. 02 let year =2019;
  • C. 01 let monthName ='July';
  • D. 02 const year = 2020;

Answer: C

 

NEW QUESTION 67
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 68
Given two expressions var1 and var2. What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean ?
Choose 2 answers:

  • A. var1 && var2
  • B. Boolean(var1) && Boolean(var2)
  • C. Boolean(var1 && var2)
  • D. var1.toBoolean() && var2toBoolean()

Answer: B,C

 

NEW QUESTION 69
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 70
Given the code below:
Function myFunction(){
A =5;
Var b =1;
}
myFunction();
console.log(a);
console.log(b);
What is the expected output?

  • A. Line 08 thrones an error, therefore line 09 is never executed.
  • B. Line 08 outputs the variable, but line 09 throws an error.
  • C. Both lines 08 and 09 are executed, and the variables are outputted.
  • D. Both lines 08 and 09 are executed, but values outputted are undefined.

Answer: B

 

NEW QUESTION 71
Given the following code:
document.body.addEventListener(' click ', (event) => {
if (/* CODE REPLACEMENT HERE */) {
console.log('button clicked!');
)
});
Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?

  • A. Event.clicked
  • B. button.addEventListener('click')
  • C. e.nodeTarget ==this
  • D. event.target.nodeName == 'BUTTON'

Answer: D

 

NEW QUESTION 72
......

CRT-600 Practice Test Pdf Exam Material: https://www.exam4labs.com/CRT-600-practice-torrent.html

CRT-600 Answers CRT-600 Free Demo Are Based On The Real Exam: https://drive.google.com/open?id=1ALiGz6W5iSKutcVDo0zOg_Y_-2xmP0OB