2022 Realistic CRT-600 Dumps Latest Salesforce Practice Tests Dumps [Q25-Q44]

Share

2022 Realistic CRT-600 Dumps Latest Salesforce Practice Tests Dumps

CRT-600 Dumps PDF - CRT-600 Real Exam Questions Answers


Salesforce CRT-600 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Server Side JavaScript Debugging in Node.js, Node.js Libraries
Topic 2
  • Creating Objects, Object Prototypes, Defining Functions
Topic 3
  • JavaScript Basics
  • Working with Strings, Numbers, and Dates
Topic 4
  • Debugging and Error Handling
  • Throwing and Catching Errors
  • Working with the Console
Topic 5
  • Objects, Functions, and Classes
  • Using JavaScript Modules
  • Declaring Classes

 

NEW QUESTION 25
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.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
  • B. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));
  • C. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
  • D. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;

Answer: C

 

NEW QUESTION 26
Refer to the HTML below:
<div id="main">
<ul>
<li>Leo</li>
<li>Tony</li>
<li>Tiger</li>
</ul>
</div>
Which JavaScript statement results in changing " Tony" to "Mr. T."?

  • A. document.querySelector('$main li.Tony').innerHTML = ' Mr. T. ';
  • B. document.querySelectorAll('$main $TONY').innerHTML = ' Mr. T. ';
  • C. document.querySelector('$main li:second-child').innerHTML = ' Mr. T. ';
  • D. document.querySelector('$main li:nth-child(2)'),innerHTML = ' Mr. T. ';

Answer: D

 

NEW QUESTION 27
Which three statements are true about promises ?
Choose 3 answers

  • A. The executor of a new Promise runs automatically.
  • B. A pending promise can become fulfilled, settled, or rejected.
  • C. A fulfilled or rejected promise will not change states .
  • D. A Promise has a .then() method.
  • E. A settled promise can become resolved.

Answer: B,C,D

 

NEW QUESTION 28
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 window.localStorage.getItem(storageKey);
    }
  • D. const retrieveFromLocalStorage = (storageKey) =>{
    return JSON.parse(window.localStorage.getItem(storageKey));
    }

Answer: D

 

NEW QUESTION 29
A developer creates an object where its properties should be immutable and prevent properties from being added or modified.
Which method should be used to execute this business requirement ?

  • A. Object.const()
  • B. Object.eval()
  • C. Object.lock()
  • D. Object.freeze()

Answer: D

 

NEW QUESTION 30
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 only needed for local development and testing.
  • C. Other required packages depend on it for development.
  • D. It is required by the application in production.

Answer: B

 

NEW QUESTION 31
A developer has an ErrorHandler module that contains multiple functions.
What kind of export be leverages so that multiple functions can be used?

  • A. All
  • B. Default
  • C. Multi
  • D. Named

Answer: D

 

NEW QUESTION 32
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. var1.toBoolean() && var2toBoolean()
  • C. Boolean(var1) && Boolean(var2)
  • D. Boolean(var1 && var2)

Answer: C,D

 

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

  • A. B
  • B. A
  • C. C
  • D. D

Answer: B

 

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

Answer: B

 

NEW QUESTION 35
Given the JavaScript below:
01 function filterDOM (searchString) {
02 const parsedSearchString = searchString && searchString.toLowerCase() ;
03 document.quesrySelectorAll(' .account' ) . forEach(account => (
04 const accountName = account.innerHTML.toLOwerCase();
05 account. Style.display = accountName.includes(parsedSearchString) ? /*Insert code*/;
06 )};
07 }
Which code should replace the placeholder comment on line 05 to hide accounts that do not match the search string?

  • A. ' Block ' : ' none '
  • B. ' visible ' : ' hidden '
  • C. ' hidden ' : ' visible '
  • D. ' name ' : ' block '

Answer: A

 

NEW QUESTION 36
Teams at Universal Containers (UC) work on multiple JavaScript projects at the same time.
UC is thinking about reusability and how each team can benefit from the work of others.
Going open-source or public is not an option at this time.
Which option is available to UC with npm?

  • A. Private registries are not supported by npm, but packages can be installed via URL.
  • B. Private packages are not supported, but they can use another package manager like yarn.
  • C. Private registries are not supported by npm, but packages can be installed via git.
  • D. Private packages can be scored, and scopes can be associated to a private registries.

Answer: D

 

NEW QUESTION 37
Given code below:
setTimeout (() => (
console.log(1);
). 0);
console.log(2);
New Promise ((resolve, reject )) = > (
setTimeout(() => (
reject(console.log(3));
). 1000);
)).catch(() => (
console.log(4);
));
console.log(5);
What is logged to the console?

  • A. 1 2 4 3 5
  • B. 2 1 4 3 5
  • C. 2 5 1 3 4
  • D. 1 2 5 3 4

Answer: C

 

NEW QUESTION 38
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. Document.addEventListener('''DOMContextLoaded' , personalizeWebsiteContext);
  • B. window.addEventListener('onload', personalizeWebsiteContext);
  • C. document.addEventListener(''onDOMContextLoaded', personalizeWebsiteContext);
  • D. window.addEventListener('load',personalizeWebsiteContext);

Answer: D

 

NEW QUESTION 39
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 02 assertion passes.
  • B. The line 05 assertion passes.
  • C. The line 02 assertion fails
  • D. The line 05 assertion fails.

Answer: A,D

 

NEW QUESTION 40
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 41
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. trimStart(searchString);
  • C. searchString.replace(/*\s\s*/, '');
  • D. searchString.trimEnd();

Answer: A,C

 

NEW QUESTION 42
A developer is wondering whether to use, Promise.then or Promise.catch, especially when a Promise throws an error?
Which two promises are rejected?
Which 2 are correct?

  • A. Promise.reject('cool error here').then(error => console.error(error));
  • B. Promise.reject('cool error here').catch(error => console.error(error));
  • C. New Promise(() => (throw 'cool error here'}).then(null, error => console.error(error)));
  • D. New Promise((resolve, reject) => (throw 'cool error here'}).catch(error => console.error(error)) ;

Answer: B,D

 

NEW QUESTION 43
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. Angular
  • B. Koa
  • C. Vue
  • D. Express

Answer: A,D

 

NEW QUESTION 44
......

CRT-600 Premium Exam Engine pdf Download: https://testking.vceengine.com/CRT-600-vce-test-engine.html