[Mar 09, 2022] Get to the Top with CRT-600 Practice Exam Questions [Q66-Q84]

Share

[Mar 09, 2022] Get to the Top with CRT-600 Practice Exam Questions

Use Real CRT-600 Dumps Free Sample Questions and Practice Test Engine


Salesforce CRT-600 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Asynchronous Programming
  • Callback Functions
  • Promises and Async
  • Await
Topic 2
  • Browser and Events
  • Document Object Model
  • Browser Dev Tools
Topic 3
  • Creating Objects, Object Prototypes, Defining Functions
Topic 4
  • Debugging and Error Handling
  • Throwing and Catching Errors
  • Working with the Console
Topic 5
  • Type Conversion (explicit and implicit)
  • Working with JSON
  • Data Types and Variables
Topic 6
  • Objects, Functions, and Classes
  • Using JavaScript Modules
  • Declaring Classes

 

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

Answer: C

 

NEW QUESTION 68
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 69
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers

  • A. IIFEs
  • B. Global variables
  • C. indexedDB
  • D. localStorage.
  • E. Cookies

Answer: A,C,D

 

NEW QUESTION 70
A developer is creating a simple webpage with a button. When a user clicks this button for the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
01 function listen(event) {
02 alert ( 'Hey! I am John Doe') ;
03 button.addEventListener ('click', listen);
Which two code lines make this code work as required?
Choose 2 answers

  • A. On line 04, use event.stopPropagation ( ),
  • B. On line 02, use event.first to test if it is the first execution.
  • C. On line 06, add an option called once to button.addEventListener().
  • D. On line 04, use button.removeEventListener(' click" , listen);

Answer: C,D

 

NEW QUESTION 71
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[0] === 0 && arr[ arr.length] === 0);
  • B. console.assert (arr.length >0);
  • C. arr.forEach(elem => console.assert(elem === 0)) ;
  • D. console.assert( arr.length === 5 );

Answer: C,D

 

NEW QUESTION 72
Universal Containers (UC) notices that its application that allows users to search for accounts makes a network request each time a key is pressed. This results in too many requests for the server to handle.
* Address this problem, UC decides to implement a debounce function on string change handler.
What are three key steps to implement this debounce function?
Choose 3 answers:

  • A. Store the timeId of the setTimeout last enqueued by the search string change handle.
  • B. If there is an existing setTimeout and the search string changes, cancel the existing setTimeout using the persisted timerId and replace it with a new setTimeout.
  • C. When the search string changes, enqueue the request within a setTimeout.
  • D. If there is an existing setTimeout and the search string change, allow the existing setTimeout to finish, and do not enqueue a new setTimeout.
  • E. Ensure that the network request has the property debounce set to true.

Answer: C,D,E

 

NEW QUESTION 73
A developer has the function, shown below, that is called when a page loads.
function onload() {
console.log("Page has loaded!");
}
Where can the developer see the log statement after loading the page in the browser?

  • A. On the webpage.
  • B. Browser performance toots
  • C. Terminal running the web server.
  • D. Browser javaScript console

Answer: D

 

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

Answer: D

 

NEW QUESTION 75
developer publishes a new version of a package with new features that do not break backward compatibility. The previous version number was 1.1.3.
Following semantic versioning format, what should the new package version number be?

  • A. 1.2.3
  • B. 1.1.4
  • C. 2.0.0
  • D. 1.2.0

Answer: D

 

NEW QUESTION 76
developer has a web server running with Node.js. The command to start the web server is node server,js. The web server started having latency issues. Instead of a one second turn around for web requests, the developer now sees a five second turnaround, Which command can the web developer run to see what the module is doing during the latency period?

  • A. NODE_DEBUG =http, https node server.js
  • B. DEBUG = http, https node server.js
  • C. NODE_DEBUG =true node server.js
  • D. DEBUG =true node server.js

Answer: D

 

NEW QUESTION 77
developer removes the HTML class attribute from the checkout button, so now it is simply:
<button>Checkout</button>.
There is a test to verify the existence of the checkout button, however it looks for a button with class= "blue". The test fails because no such button is found.
Which type of test category describes this test?

  • A. True positive
  • B. True negative
  • C. False negative
  • D. False positive

Answer: C

 

NEW QUESTION 78
Given the code below:
const copy = JSON.stringify([ new String(' false '), new Bollean( false ), undefined ]); What is the value of copy?

  • A. -- [ \"false\" ,false, null ]--
  • B. -- [ \"false\" , { } ]--
  • C. -- [ \"false\" , false, undefined ]--
  • D. -- [ false, { } ]--

Answer: A

 

NEW QUESTION 79
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 - 10
  • B. 10 - 5
  • C. 5 -5
  • D. 10 -10

Answer: D

 

NEW QUESTION 80
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. Undefined
  • B. 'Null value!'
  • C. 'Undefined values!'
  • D. Line 13 throws an error.

Answer: A

 

NEW QUESTION 81
Refer to the following array:
Let arr1 = [ 1, 2, 3, 4, 5 ];

Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?

  • A. Let arr2 = Array.from(arr1);
  • B. Let arr2 = arr1.slice(0, 5);
  • C. Let arr2 = arr1;
  • D. Let arr2 = arr1.sort();

Answer: A,B

 

NEW QUESTION 82
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 83
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 84
......

Pass Salesforce CRT-600 exam - questions - convert Tets Engine to PDF: https://www.vcedumps.com/CRT-600-examcollection.html

2022 Realistic Verified Free Salesforce CRT-600 Exam Questions: https://drive.google.com/open?id=1HvFfx5HSnyX6RwLgR6vruSXyWPbfTN5O