[Sep-2021] CRT-600 Dumps Full Questions - Salesforce Certified Exam Study Guide [Q16-Q36]

Share

[Sep-2021] CRT-600 Dumps Full Questions - Salesforce Certified Exam Study Guide

Exam Questions and Answers for  CRT-600 Study Guide

NEW QUESTION 16
Refer to code below:
console.log(0);
setTimeout(() => (
console.log(1);
});
console.log(2);
setTimeout(() => {
console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?

  • A. 02413
  • B. 01234
  • C. 02431
  • D. 0

Answer: A

 

NEW QUESTION 17
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 18
A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:
Import printPrice from '/path/PricePrettyPrint.js';
Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work ?

  • A. printPrice must be a multi exportc
  • B. printPrice must be be a named export
  • C. printPrice must be the default export
  • D. printPrice must be an all export

Answer: C

 

NEW QUESTION 19
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 20
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.setDate(( new Date ( )).getDate () +9);
  • B. deliveryDate.setDate( Date.current () + 9);
  • C. deliveryDate.date = new Date(+9) ;
  • D. deliveryDate.date = Date.current () + 9;

Answer: A

 

NEW QUESTION 21
Refer to the following code:
<html lang="en">
<body>
<div onclick = "console.log('Outer message') ;">
<button id ="myButton">CLick me<button>
</div>
</body>
<script>
function displayMessage(ev) {
ev.stopPropagation();
console.log('Inner message.');
}
const elem = document.getElementById('myButton');
elem.addEventListener('click' , displayMessage);
</script>
</html>
What will the console show when the button is clicked?

  • A. Inner message
    Outer message
  • B. Outer message
    Inner message
  • C. Inner message
  • D. Outer message

Answer: C

 

NEW QUESTION 22
A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a good experience, a script named personaliseContext needs to be executed when the webpage is fully loaded (HTML content and all related files ), in order to do some custom initialization.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

  • A. window.addEventListener('load',personalizeWebsiteContext);
  • B. window.addEventListener('onload', personalizeWebsiteContext);
  • C. document.addEventListener(''onDOMContextLoaded', personalizeWebsiteContext);
  • D. Document.addEventListener('''DOMContextLoaded' , personalizeWebsiteContext);

Answer: A

 

NEW QUESTION 23
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 24
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. 2 3 1
  • C. 1 2 3
  • D. 1 3 2

Answer: B

 

NEW QUESTION 25
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. [ 'pizza','Burger', 'French fires', 'Garlic bread']
  • C. [ 'Garlic bread' , 'pizza','Burger', 'French fires' ]
  • D. [ 'pizza','Burger', 'French fires']

Answer: D

 

NEW QUESTION 26
Refer to the code below:
let timeFunction =() => {
console.log('Timer called.");
};
let timerId = setTimeout (timedFunction, 1000);
Which statement allows a developer to cancel the scheduled timed function?

  • A. removeTimeout(timedFunction);
  • B. clearTimeout(timedFunction);
  • C. removeTimeout(timerId);
  • D. clearTimeout(timerId);

Answer: D

 

NEW QUESTION 27
A developer has two ways to write a function:
Option A:
function Monster() {
This.growl = () => {
Console.log ("Grr!");
}
}
Option B:
function Monster() {};
Monster.prototype.growl =() => {
console.log("Grr!");
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A Option B?

  • A. 1 growl method is created regardless of which option is used.
  • B. 1000 growl method is created for Option A. 1 growl methods are created for Option B.
  • C. 1000 growl methods are created regardless of which option is used.
  • D. 1 growl method is created for Option A. 1000 growl methods are created for Option B.

Answer: B

 

NEW QUESTION 28
Refer to the code below?
Let searchString = ' look for this ';
Which two options remove the whitespace from the beginning of searchString?
Choose 2 answers

  • A. searchString.trimStart();
  • B. searchString.replace(/*\s\s*/, '');
  • C. searchString.trimEnd();
  • D. trimStart(searchString);

Answer: A,B

 

NEW QUESTION 29
Refer to the code below:
function changeValue(param) {
Param =5;
}
Let a =10;
Let b =5;
changeValue(b);
Const result = a+ " - "+ b;
What is the value of result when code executes?

  • A. 5 -5
  • B. 5 - 10
  • C. 10 - 5
  • D. 10 -10

Answer: D

 

NEW QUESTION 30
What are two unique features of functions defined with a fat arrow as compared to normal function definition?
Choose 2 answers

  • A. The function generated its own this making it useful for separating the function's scope from its enclosing scope.
  • B. The function uses the this from the enclosing scope.
  • C. If the function has a single expression in the function body, the expression will be evaluated and implicit returned.
  • D. The function receives an argument that is always in scope, called parentThis, which is the enclosing lexical scope.

Answer: A,C

 

NEW QUESTION 31
Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?

  • A. console.log(10/ Number('5'));
  • B. console.log(10/0);
  • C. console.log(10/ ''five);
  • D. console.log(parseInt('two'));

Answer: A

 

NEW QUESTION 32
Refer to the following code:
function test (val) {
If (val === undefined) {
return 'Undefined values!' ;
}
if (val === null) {
return 'Null value! ';
}
return val;
}
Let x;
test(x);
What is returned by the function call on line 13?

  • A. 'Null value!'
  • B. 'Undefined values!'
  • C. Undefined
  • D. Line 13 throws an error.

Answer: C

 

NEW QUESTION 33
A developer creates a class that represents a blog post based on the requirement that a Post should have a body author and view count.
The Code shown Below:
Class Post {
// Insert code here
This.body =body
This.author = author;
this.viewCount = viewCount;
}
}
Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instanceof a Post with the three attributes correctly populated?

  • A. constructor() {
  • B. super (body, author, viewCount) {
  • C. Function Post (body, author, viewCount) {
  • D. constructor (body, author, viewCount) {

Answer: D

 

NEW QUESTION 34
A developer writers the code below to calculate the factorial of a given number.
Function factorial(number) {
Return number + factorial(number -1);
}
factorial(3);
What is the result of executing line 04?

  • A. -Infinity
  • B. RuntimeError
  • C. 0
  • D. 1

Answer: B

 

NEW QUESTION 35
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 () (20)
  • B. sum(5)(5)
  • C. Sum (5, 5) ()
  • D. sum(10) ()
  • E. sum() (5, 5)

Answer: B,E

 

NEW QUESTION 36
......

Salesforce Certified JavaScript Developer I Free Update With 100% Exam Passing Guarantee: https://www.prep4pass.com/CRT-600_exam-braindumps.html

Real Exam Questions & Answers - Salesforce CRT-600 Dump is Ready: https://drive.google.com/open?id=14HuW_kXI4jNmoE_awEKFSpaE1uN4D-7z