[UPDATED 2022] Salesforce CRT-600 Questions Prepare with Free Demo of PDF NEW 2022 Certification Sample Questions CRT-600 Dumps Practice Exam Salesforce CRT-600 Exam Syllabus Topics: TopicDetailsTopic 1Creating Objects, Object Prototypes, Defining FunctionsTopic 2Type Conversion (explicit and implicit) Working with JSON Data Types and VariablesTopic 3Server Side JavaScript Debugging in Node.js, Node.js [...]

[UPDATED 2022] Salesforce CRT-600 Questions Prepare with Free Demo of PDF [Q13-Q29]

Share

[UPDATED 2022] Salesforce CRT-600 Questions Prepare with Free Demo of PDF

NEW 2022 Certification Sample Questions CRT-600 Dumps & Practice Exam


Salesforce CRT-600 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Creating Objects, Object Prototypes, Defining Functions
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
  • Browser and Events
  • Document Object Model
  • Browser Dev Tools

 

NEW QUESTION 13
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. Both lines 08 and 09 are executed, but values outputted are undefined.
  • C. Line 08 outputs the variable, but line 09 throws an error.
  • D. Line 08 thrones an error, therefore line 09 is never executed.

Answer: C

 

NEW QUESTION 14
Refer to following code:
class Vehicle {
constructor(plate) {
This.plate =plate;
}
}
Class Truck extends Vehicle {
constructor(plate, weight) {
//Missing code
This.weight = weight;
}
displayWeight() {
console.log('The truck ${this.plate} has a weight of ${this.weight} lb.');}} Let myTruck = new Truck('123AB', 5000); myTruck.displayWeight(); Which statement should be added to line 09 for the code to display 'The truck 123AB has a weight of 5000lb.'?

  • A. This.plate =plate;
  • B. Super.plate =plate;
  • C. super(plate);
  • D. Vehicle.plate = plate;

Answer: C

 

NEW QUESTION 15
is below:
<input type="file" onchange="previewFile()">
<img src="" height="200" alt="Image Preview..."/>
The JavaScript portion is:
01 function previewFile(){
02 const preview = document.querySelector('img');
03 const file = document.querySelector('input[type=file]').files[0];
04 //line 4 code
05 reader.addEventListener("load", () => {
06 preview.src = reader.result;
07 },false);
08 //line 8 code
09 }
In lines 04 and 08, which code allows the user to select an image from their local computer , and to display the image in the browser?

  • A. 04 const reader = new File();
    08 if (file) reader.readAsDataURL(file);
  • B. 04 const reader = new FileReader();
    08 if (file) URL.createObjectURL(file);
  • C. 04 const reader = new File();
    08 if (file) URL.createObjectURL(file);
  • D. 04 const reader = new FileReader();
    08 if (file) reader.readAsDataURL(file);

Answer: D

 

NEW QUESTION 16
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. Undefined
  • D. Developer

Answer: C

 

NEW QUESTION 17
Refer to the code below:
new Promise((resolve, reject) => {
const fraction = Math.random();
if( fraction >0.5) reject("fraction > 0.5, " + fraction);
resolve(fraction);
})
.then(() =>console.log("resolved"))
.catch((error) => console.error(error))
.finally(() => console.log(" when am I called?"));

When does Promise.finally on line 08 get called?

  • A. When rejected
  • B. When resolved or rejected
  • C. WHen resolved
  • D. When resolved and settled

Answer: B

 

NEW QUESTION 18
Which statement accurately describes an aspect of promises?

  • A. In a.then() function, returning results is not necessary since callbacks will catch the result of a previous promise.
  • B. .then() cannot be added after a catch.
  • C. .then() manipulates and returns the original promise.
  • D. Arguments for the callback function passed to .then() are optional.

Answer: D

 

NEW QUESTION 19
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 ( ). done(function(data){
    return data;
    });
  • B. Async runParallel () .then(data);
  • C. runParallel () .then(data);
  • D. runParallel () .then(function(data)
    return data

Answer: A,D

 

NEW QUESTION 20
A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
<input type =" text" value="Hello" name ="input">
<button type ="button" >Display </button>
The developer wrote the javascript code below:
Const button = document.querySelector('button');
button.addEvenListener('click', () => (
Const input = document.querySelector('input');
console.log(input.getAttribute('value'));
When the user clicks the button, the output is always "Hello".
What needs to be done make this code work as expected?

  • A. Replace line 04 with console.log(input .value);
  • B. Replace line 02 with button.addCallback("click", function() {
  • C. Replace line 03 with const input = document.getElementByName('input');
  • D. Replace line 02 with button.addEventListener("onclick", function() {

Answer: A

 

NEW QUESTION 21
Refer to the code below:
01 const server = require('server');
02 /* Insert code here */
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers Which code should be inserted at the line 03 to set up an event and start the web server ?

  • A. Server.start ();
  • B. server.on(' connect ' , ( port) => {
    console.log('Listening on ' , port) ;})
  • C. server()
  • D. console.log( 'Listening on ', port) ;
  • E. serve(( port) => (

Answer: B

 

NEW QUESTION 22
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 results in an out of memory issue.
  • D. The function has an error that should not be silenced.

Answer: A

 

NEW QUESTION 23
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 24
Which statement phrases successfully?

  • A. JSON.parse ( " foo " );
  • B. JSON.parse(' " foo " ');
  • C. JSON.parse( " ' foo ' " );
  • D. JSON.parse ( ' foo ' );

Answer: B

 

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

Answer: A

 

NEW QUESTION 26
developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript.
Which three benefits of Node.js can the developer use to persuade their manager?
Choose 3 answers:

  • A. Executes server-side JavaScript code to avoid learning a new language.
  • B. Ensures stability with one major release every few years.
  • C. I nstalls with its own package manager to install and manage third-party libraries.
  • D. User non blocking functionality for performant request handling .
  • E. Performs a static analysis on code before execution to look for runtime errors.

Answer: C,D,E

 

NEW QUESTION 27
Which option is true about the strict mode in imported modules?

  • A. You can only reference notStrict() functions from the imported module.
  • B. Imported modules are in strict mode whether you declare them as such or not.
  • C. Add the statement use non-strict, before any other statements in the module to enable not-strict mode.
  • D. Add the statement use strict =false; before any other statements in the module to enable not- strict mode.

Answer: A

 

NEW QUESTION 28
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 29
......

CRT-600 Deluxe Study Guide with Online Test Engine: https://freetorrent.braindumpsvce.com/CRT-600_exam-dumps-torrent.html