[Q18-Q41] Full CRT-600 Practice Test and 215 Unique Questions, Get it Now! | DumpsMaterials

[Q18-Q41] Full CRT-600 Practice Test and 215 Unique Questions, Get it Now!

Share

Full CRT-600 Practice Test and 215 Unique Questions, Get it Now!

The Best CRT-600 Exam Study Material Premium Files  and Preparation Tool


Salesforce CRT-600 Exam Syllabus Topics:

TopicDetails
Topic 1
  • JavaScript Basics
  • Working with Strings, Numbers, and Dates
Topic 2
  • Creating Objects, Object Prototypes, Defining Functions
Topic 3
  • Asynchronous Programming
  • Callback Functions
  • Promises and Async
  • Await
Topic 4
  • Browser and Events
  • Document Object Model
  • Browser Dev Tools
Topic 5
  • Objects, Functions, and Classes
  • Using JavaScript Modules
  • Declaring Classes
Topic 6
  • Debugging and Error Handling
  • Throwing and Catching Errors
  • Working with the Console

 

NEW QUESTION 18
Given the JavaScript below:

Which code should replace the placeholder comment on line 05 to highlight accounts that match the search string'

  • A. 'yellow' : null
  • B. null : 'yellow'
  • C. 'yellow : 'none'
  • D. 'none1 : "yellow'

Answer: C

 

NEW QUESTION 19
A developer has two ways to write a function:
Option A:
function Monster(){
this.growl = ()=>{
console.log('Grr!');
}
}
Option B:
function Monster(){};
Monster.prototype.growl = ()=>{
console.log('Grr!');
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A and Option B?

  • A. 1000 for both
  • B. 1 for Option A, 1000 for Option B
  • C. 1 methods for both
  • D. 1000 for Option A, 1 for Option B

Answer: C

 

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

Answer: B

 

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

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

Answer: C

 

NEW QUESTION 22
Refer to the following code block:
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} is making a sound.`)
}
}
class Dog extends Animal{
constructor(name){
super(name)
this.name = name;
}
makeSound(){
console.log(`${this.name} is barking.`)
}
}
let myDog = new Dog('Puppy');
myDog.makeSound();
What is the console output?

  • A. Puppy is barking

Answer: A

 

NEW QUESTION 23
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 array after the code executes?

  • A. [1, 2, 3, 5]
  • B. [1, 2, 3, 4, 5, 4]
  • C. [1, 2, 3, 4, 4, 5, 4]
  • D. [1, 2, 3, 4, 5, 4, 4]

Answer: C

Explanation:

 

NEW QUESTION 24
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) URL.createObjectURL(file);
  • B. 04 const reader = new FileReader();
    08 if (file) reader.readAsDataURL(file);
  • C. 04 const reader = new FileReader();
    08 if (file) URL.createObjectURL(file);
  • D. 04 const reader = new File();
    08 if (file) reader.readAsDataURL(file);

Answer: B

 

NEW QUESTION 25
A developer creates a class that represents a blog post based on the requirement that a Post should have a body author and view count.
The Code shown Below:
Class Post {
// Insert code here
This.body =body
This.author = author;
this.viewCount = viewCount;
}
}
Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instanceof a Post with the three attributes correctly populated?

  • A. constructor (body, author, viewCount) {
  • B. super (body, author, viewCount) {
  • C. constructor() {
  • D. Function Post (body, author, viewCount) {

Answer: A

 

NEW QUESTION 26
A developer wrote the following code:
01 let X = object.value;
02
03 try {
04 handleObjectValue(X);
05 } catch (error) {
06 handleError(error);
07 }
The developer has a getNextValue function to execute after handleObjectValue(), but does not want to execute getNextValue() if an error occurs.
How can the developer change the code to ensure this behavior?

  • A. 03 try{
    04 handleObjectValue(x);
    05 } catch(error){
    06 handleError(error);
    07 } finally {
    08 getNextValue();
    10 }
  • B. 03 try{
    04 handleObjectValue(x);
    05 } catch(error){
    06 handleError(error);
    07 }
    08 getNextValue();
  • C. 03 try{
    04 handleObjectValue(x);
    05 } catch(error){
    06 handleError(error);
    07 } then {
    08 getNextValue();
    09 }
  • D. 03 try {
    04 handleObjectValue(x)
    05 ........................

Answer: D

 

NEW QUESTION 27
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.stopPropagation(); to printMessage function.
  • C. Add event.removeEventListener(); to window.onLoad event handler.
  • D. Add event.removeEventListener(); toprintMessage function.

Answer: B

 

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

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

Answer: B

 

NEW QUESTION 29
At Universal Containers, every team has its own way of copying JavaScript objects. The code snippet shows an Implementation from one team:

What is the output of the code execution?

  • A. Hello Dan
  • B. Hello Dan Doe
  • C. SyntaxError: Unexpected token in JSON
  • D. Hello John Doe

Answer: C

 

NEW QUESTION 30
Refer to code below:
Function muFunction(reassign){
Let x = 1;
var y = 1;
if( reassign ) {
Let x= 2;
Var y = 2;
console.log(x);
console.log(y);}
console.log(x);
console.log(y);}
What is displayed when myFunction(true) is called?

  • A. 2 2 undefined undefined
  • B. 2 2 1 1
  • C. 2 2 2 2
  • D. 2 2 1 2

Answer: D

 

NEW QUESTION 31
Refer to code below:
Let productSKU = '8675309' ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with 'sku', and padded with zeros.
Which statement assigns the values sku0000000008675309 ?

  • A. productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');
  • B. productSKU = productSKU .padEnd (16. '0').padstart(19, 'sku');
  • C. productSKU = productSKU .padEnd (16. '0').padstart('sku');
  • D. productSKU = productSKU .padStart (19. '0').padstart('sku');

Answer: A

 

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

Answer: A

 

NEW QUESTION 33
Which statement accurately describes the behaviour of the async/ await keyworks ?

  • A. The associated sometimes returns a promise.
  • B. The associated function will always return a promise
  • C. The associated class contains some asynchronous functions.
  • D. The associated function can only be called via asynchronous methods

Answer: B

 

NEW QUESTION 34
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 resolved and settled
  • B. When resolved or rejected
  • C. WHen resolved
  • D. When rejected

Answer: B

 

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

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

Answer: C

 

NEW QUESTION 36
Given the code below:
Which three code segments result in a correct conversion from number to string? Choose 3 answers

  • A. let strValue = numValue. toString();
  • B. let strValue = (String)numValue;
  • C. let strValue = * * 4 numValue;
  • D. let scrValue = String(numValue);
  • E. let strValue = numValue.toText ();

Answer: A,C,D

 

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

Answer: C

 

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

Answer: B

 

NEW QUESTION 39
A developer needs to test this function:
01 const sum3 = (arr) => (
02 if (!arr.length) return 0,
03 if (arr.length === 1) return arr[0],
04 if (arr.length === 2) return arr[0] + arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function?
Choose 2 answers

  • A. console.assert(sum3(0)) == 0);
  • B. console.assert(sum3('hello', 2, 3, 4)) === NaN);
  • C. console.assert(sum3(-3, 2 )) == -1);
  • D. console.assert(sum3(1, '2')) == 12);

Answer: C,D

 

NEW QUESTION 40
Considering type coercion, what does the following expression evaluate to?
True + '13' + NaN

  • A. ' 113Nan '
  • B. 0
  • C. ' true13NaN '
  • D. ' true13 '

Answer: C

 

NEW QUESTION 41
......

Get Instant Access to CRT-600 Practice Exam Questions: https://braindumps2go.dumpsmaterials.com/CRT-600-real-torrent.html