2021 DumpsValid Salesforce CRT-600 Dumps and Exam Test Engine [Q48-Q71]

Share

2021 DumpsValid Salesforce CRT-600 Dumps and Exam Test Engine

Salesforce CRT-600 DUMPS WITH REAL EXAM QUESTIONS

NEW QUESTION 48
A developer has the following array of student test grades:
Let arr = [ 7, 8, 5, 8, 9 ];
The Teacher wants to double each score and then see an array of the students who scored more than 15 points.
How should the developer implement the request?

  • A. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
  • B. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
  • C. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
  • D. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));

Answer: C

 

NEW QUESTION 49
In which situation should a developer include a try .. catch block around their function call ?

  • A. The function might raise a runtime error that needs to be handled.
  • B. The function contains scheduled code.
  • C. The function has an error that should not be silenced.
  • D. The function results in an out of memory issue.

Answer: A

 

NEW QUESTION 50
Refer to the code below:
Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ];
Which two statements result in the array [1, 2, 3, 4, 5] ?
Choose 2 answers

  • A. [ ]. Concat (... inArray);
  • B. [ ]. concat ( [ ....inArray ] );
  • C. [ ]. concat.apply(inArray, [ ]);
  • D. [ ]. Concat.apply ([ ], inArray);

Answer: A,D

 

NEW QUESTION 51
The developer wants to test the array shown:
const arr = Array(5).fill(0)
Which two tests are the most accurate for this array ?
Choose 2 answers:

  • A. console.assert( arr.length === 5 );
  • B. console.assert(arr[0] === 0 && arr[ arr.length] === 0);
  • C. arr.forEach(elem => console.assert(elem === 0)) ;
  • D. console.assert (arr.length >0);

Answer: A,C

 

NEW QUESTION 52
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. ReferenceError: eyeColor is not defined
  • B. ReferenceError: assignment to undeclared variable "Person"
  • C. Developer
  • D. Undefined

Answer: D

 

NEW QUESTION 53
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. An error
  • B. Undefined
  • C. ' new york '
  • D. ' New York '

Answer: C

 

NEW QUESTION 54
Refer to the code below:
Let car1 = new Promise((_ , reject) =>
setTimeout(reject, 2000, "car 1 crashed in" =>
Let car2 =new Promise(resolve => setTimeout(resolve, 1500, "car 2 completed") Let car3 =new Promise(resolve => setTimeout(resolve, 3000, "car 3 completed") Promise.race(( car1, car2, car3))
.then (value => (
Let result = '$(value) the race.';)}
.catch(arr => {
console.log("Race is cancelled.", err);
});
What is the value of result when Promise.race executes?

  • A. Car 1 crashed in the race.
  • B. Race is cancelled.
  • C. Car 3 completes the race
  • D. Car 2 completed the race.

Answer: D

 

NEW QUESTION 55
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(email)
  • C. userInformation("email")
  • D. userInformation.get("email")

Answer: A,C

 

NEW QUESTION 56
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. 0
  • B. RuntimeError
  • C. 1
  • D. -Infinity

Answer: B

 

NEW QUESTION 57
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 > -1
  • B. > 5 > 0
  • C. > 5 >undefined
  • D. > true > false

Answer: C

 

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

Answer: B

 

NEW QUESTION 59
Why would a developer specify a package.jason as a developed forge instead of a dependency ?

  • A. It should be bundled when the package is published.
  • B. It is required by the application in production.
  • C. Other required packages depend on it for development.
  • D. It is only needed for local development and testing.

Answer: D

 

NEW QUESTION 60
Given the code below:
Function myFunction(){
A =5;
Var b =1;
}
myFunction();
console.log(a);
console.log(b);
What is the expected output?

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

Answer: B

 

NEW QUESTION 61
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").innerHTML = 'Completed' ;
  • B. document.getElementById(".status").innerHTML = 'Completed' ;
  • C. document.getElementById("#status").innerHTML = 'Completed' ;
  • D. document.getElementById("status").Value = 'Completed' ;

Answer: A

 

NEW QUESTION 62
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. End
    Start
    Success
  • B. Success
    Start
    End
  • C. Start
    End
    Success
  • D. Start
    Success
    End

Answer: C

 

NEW QUESTION 63
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.name.startsWith('N') ? 1: 0;
    Return acc +sum
  • B. Const sum = curr.name.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • C. Const sum = curr.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • D. Const sum = curr.startsWith('N') ? 1: 0;
    Return acc +sum

Answer: B

 

NEW QUESTION 64
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 the default export
  • B. printPrice must be be a named export
  • C. printPrice must be a multi exportc
  • D. printPrice must be an all export

Answer: A

 

NEW QUESTION 65
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(parseInt('two'));
  • D. console.log(10/ ''five);

Answer: A

 

NEW QUESTION 66
Refer to the code:

Given the code above, which three properties are set pet1?
Choose 3 answers:

  • A. Name
  • B. Type
  • C. Owner
  • D. Size
  • E. canTalk

Answer: B,D,E

 

NEW QUESTION 67
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. clearTimeout(timerId);
  • B. removeTimeout(timerId);
  • C. removeTimeout(timedFunction);
  • D. clearTimeout(timedFunction);

Answer: A

 

NEW QUESTION 68
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 () (20)
  • E. Sum (5, 5) ()

Answer: A,B

 

NEW QUESTION 69
Refer to the code below:
const addBy = ?
const addByEight =addBy(8);
const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum?
Choose 2 answers

  • A. const addBy = function(num1){
    return num1 + num2;
    }
  • B. const addBy = function(num1){
    return function(num2){
    return num1 + num2;
    }
  • C. const addBY = (num1) => (num2) => num1 + num2;
  • D. const addBy = (num1) => num1 + num2 ;

Answer: B,C

 

NEW QUESTION 70
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, 4, 5, 4, 4]
  • B. [1, 2, 3, 4, 5, 4]
  • C. [1, 2, 3, 4, 4, 5, 4]
  • D. [1, 2, 3, 5]

Answer: B

 

NEW QUESTION 71
......


Salesforce CRT-600 Exam Syllabus Topics:

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

 

2021 New DumpsValid CRT-600 PDF Recently Updated Questions: https://www.dumpsvalid.com/CRT-600-still-valid-exam.html