Pass Your Salesforce CRT-600 Exam with Correct 225 Questions and Answers [Q110-Q131]

Share

Pass Your Salesforce CRT-600 Exam with Correct 225 Questions and Answers

Latest [Apr 23, 2023] 2023 Realistic Verified CRT-600 Dumps


The Salesforce CRT-600 exam is an excellent opportunity for developers to showcase their skills and knowledge in the area of JavaScript coding within the Salesforce platform. It is a highly respected certification that can help developers advance their careers in the Salesforce ecosystem. With the high demand for Salesforce developers, this certification can open up numerous job opportunities for professionals in this field.


The Salesforce CRT-600 exam covers a range of topics related to JavaScript development, including JavaScript syntax and concepts, debugging and testing, as well as integration with Salesforce APIs and security considerations. Candidates will also be tested on their ability to design and implement custom user interfaces using Lightning components.

 

NEW QUESTION # 110
A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript. The website includes multiple external resources that are loaded when the page is opened.
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage Is loaded and there Is no need to wait for the resources to be available.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

  • A. windows,addEventListener('onDOMCContentLoaded', personalizeWebsiteContent);
  • B. windows,addEventListener('load', personalizeWebsiteContent);
  • C. windows,addEventListener('DOMContent Loaded ', personalizeWebsiteContent);
  • D. windows,addEventListener('onload', personalizeWebsiteContent);

Answer: B


NEW QUESTION # 111
What is the result of the code block?

  • A. The console logs 'flag' and another flag.
  • B. The console logs 'flag' and then an error is thrown.
  • C. An error is thrown.
  • D. The console logs only 'flag'.

Answer: B


NEW QUESTION # 112
Given the following code:

What will be the first four numbers logged?

  • A. 0123
  • B. 0112
  • C. 0012
  • D. 0122

Answer: B


NEW QUESTION # 113
Refer to the code below:
Const pi = 3.1415326,
What is the data type of pi?

  • A. Number
  • B. Decimal
  • C. Float
  • D. Double

Answer: A


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

Answer: A


NEW QUESTION # 115
Refer to the following code that imports a module named utils:
import (foo, bar) from '/path/Utils.js';
foo() ;
bar() ;
Which two implementations of Utils.js export foo and bar such that the code above runs without error?
Choose 2 answers

  • A. // FooUtils.js and BarUtils.js exist
    Import (foo) from '/path/FooUtils.js';
    Import (boo) from ' /path/NarUtils.js';
  • B. Export default class {
    foo() { return 'foo' ; }
    bar() { return 'bar' ; }
    }
  • C. const foo = () => { return 'foo';}
    const bar = () => {return 'bar'; }
    Export default foo, bar;
  • D. const foo = () => { return 'foo' ; }
    const bar = () => { return 'bar' ; }
    export { bar, foo }

Answer: B,D


NEW QUESTION # 116
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. Info
  • B. Log
  • C. Message
  • D. Assert
  • E. Error

Answer: A,D


NEW QUESTION # 117
Given the following code:
let x = null;
console.log(typeof x);
What is the output?

  • A. "undefined"
  • B. "x"
  • C. "object"
  • D. "null"

Answer: C


NEW QUESTION # 118
Refer to the code below:

Considering that JavaScript is single-threaded, what is the output of line 08 after the code executes?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: C


NEW QUESTION # 119
Refer to the code below:
<html lang="en">
<table onclick="console.log(Table log');">
<tr id="row1">
<td>Click me!</td>
</tr>
<table>
<script>
function printMessage(event) {
console.log('Row log');
}
Let elem = document.getElementById('row1');
elem.addEventListener('click', printMessage, false);
</script>
</html>
Which code change should be made for the console to log only Row log when 'Click me! ' is clicked?

  • A. Add.event.stopPropagation(); to window.onLoad event handler.
  • B. Add event.removeEventListener(); to window.onLoad event handler.
  • C. Add event.stopPropagation(); to printMessage function.
  • D. Add event.removeEventListener(); toprintMessage function.

Answer: C


NEW QUESTION # 120
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 > 0
  • C. > true > false
  • D. > 5 > -1

Answer: A


NEW QUESTION # 121
A developer initiates a server with the file server,js and adds dependencies in the source codes package,json that are required to run the server.
Which command should the developer run to start the server locally?

  • A. npm start
  • B. npm start server,js
  • C. start server,js
  • D. node start

Answer: A


NEW QUESTION # 122
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?

  • A. aPromise and bPromise run sequentially.
  • B. Only aPromise runs.
  • C. aPromise and bPromise run in parallel.
  • D. Neither aPromise or bPromise runs.

Answer: D


NEW QUESTION # 123
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 = Object.create(GameConsole.prototype).load = function
    (gamename) {
  • B. Console16bit.prototype.load = function(gamename) {
  • C. Console16bit.prototype.load(gamename) = function() {
  • D. Console16bit.prototype.load(gamename) {

Answer: B


NEW QUESTION # 124
There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales..

What is the output when executing the code above

  • A. 50
    Uncaught TypeError: saleItem,desrcription is not a function
    50
    80
  • B. 50
    80
    50
    72
  • C. 50
    80
    Uncaught Reference Error:this,discount is undefined
    72
  • D. 50
    80
    72

Answer: B


NEW QUESTION # 125
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 3 completes the race
  • B. Race is cancelled.
  • C. Car 1 crashed in the race.
  • D. Car 2 completed the race.

Answer: D


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

Answer: C


NEW QUESTION # 127
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:second-child').innerHTML = ' Mr. T. ';
  • B. document.querySelector('$main li:nth-child(2)'),innerHTML = ' Mr. T. ';
  • C. document.querySelectorAll('$main $TONY').innerHTML = ' Mr. T. ';
  • D. document.querySelector('$main li.Tony').innerHTML = ' Mr. T. ';

Answer: B


NEW QUESTION # 128
Refer to the code below:
01 const exec = (item, delay) =>{
02 new Promise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
06 );07 return `parallel is done: $(result1) $(result2)$(result3)`;
08 }}}
Which two statements correctly execute the runParallel () function?
Choose 2 answers

  • A. runParallel () .then(data);
  • B. runParallel ( ). done(function(data){
    return data;});
  • C. Async runParallel () .then(data);
  • D. runParallel () .then(function(data)
    return data

Answer: B,D


NEW QUESTION # 129
Refer to the code below:
let sayHello = () => {
console.log ('Hello, world!');
};
Which code executes sayHello once, two minutes from now?

  • A. setTimeout(sayHello, 12000);
  • B. setTimeout(sayHello(), 12000);
  • C. setInterval(sayHello, 12000);
  • D. delay(sayHello, 12000);

Answer: A


NEW QUESTION # 130
Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?
Choose 3 answers

  • A. 'use strict' has an effect between line 04 and the end of the file.
  • B. Line 05 throws an error.
  • C. 'use strict' has an effect only on line 05.
  • D. z is equal to 3.14.
  • E. 'use strict' is hoisted, so it has an effect on all lines.

Answer: B,C,D


NEW QUESTION # 131
......

Get 2023 Updated Free Salesforce CRT-600 Exam Questions and Answer: https://examcollection.prep4sureguide.com/CRT-600-prep4sure-exam-guide.html