Download Salesforce CRT-600 Sample Questions [Aug-2023]
Real CRT-600 Exam Questions and Answers FREE
Salesforce CRT-600 Certification Exam covers a wide range of topics related to developing custom applications using JavaScript in Salesforce, including Lightning Web Components (LWC), Apex, Visualforce, and other Salesforce technologies. CRT-600 exam is divided into multiple sections, each focusing on a specific area of Salesforce development. CRT-600 exam is timed and requires candidates to answer multiple-choice questions, scenario-based questions, and code challenges.
Salesforce CRT-600 is a certification exam designed for individuals who want to demonstrate their skills and knowledge in JavaScript development. Salesforce Certified JavaScript Developer I certification is intended for developers who have experience building custom applications on the Salesforce platform using JavaScript. The CRT-600 exam is part of the Salesforce Certified JavaScript Developer I certification, which validates a developer's proficiency in writing and debugging JavaScript code, as well as their ability to use JavaScript in Salesforce applications.
NEW QUESTION # 52
Refer to HTML below:
<p> The current status of an Order: <span id ="status"> In Progress </span> </p>.
Which JavaScript statement changes the text 'In Progress' to 'Completed' ?
- A. document.getElementById(".status").innerHTML = 'Completed' ;
- B. document.getElementById("status").innerHTML = 'Completed' ;
- C. document.getElementById("#status").innerHTML = 'Completed' ;
- D. document.getElementById("status").Value = 'Completed' ;
Answer: B
NEW QUESTION # 53
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, 4, 5, 4]
- B. [1, 2, 3, 5]
- C. [1, 2, 3, 4, 5, 4, 4]
- D. [1, 2, 3, 4, 4, 5, 4]
Answer: D
Explanation:
NEW QUESTION # 54
Refer to the code below:
const event = new CustomEvent(
//Missing Code
);
obj.dispatchEvent(event);
A developer needs to dispatch a custom event called update to send information about recordId.
Which two options could a developer insert at the placeholder in line 02 to achieve this?
Choose 2 answers
- A. 'Update' , (
recordId : '123abc'
( - B. { type : 'update', recordId : '123abc' }
- C. 'Update' , '123abc'
- D. 'Update' , {
Details : {
recordId : '123abc'
Answer: A,D
Explanation:
}
}
NEW QUESTION # 55
A class was written to represent items for purchase in an online store, and a second class Representing items that are on sale at a discounted price. THe constructor sets the name to the first value passed in. The pseudocode is below:
Class Item {
constructor(name, price) {
... // Constructor Implementation
}
}
Class SaleItem extends Item {
constructor (name, price, discount) {
...//Constructor Implementation
}
}
There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.
Let regItem =new Item('Scarf', 55);
Let saleItem = new SaleItem('Shirt' 80, -1);
Item.prototype.description = function () { return 'This is a ' + this.name; console.log(regItem.description()); console.log(saleItem.description()); SaleItem.prototype.description = function () { return 'This is a discounted ' + this.name; } console.log(regItem.description()); console.log(saleItem.description()); What is the output when executing the code above ?
- A. This is a Scarf
This is a Shirt
This is a Scarf
This is a discounted Shirt - B. This is a Scarf
This is a Shirt
This is a discounted Scarf
This is a discounted Shirt - C. This is a Scarf
Uncaught TypeError: saleItem.description is not a function
This is aScarf
This is a discounted Shirt - D. This is aScarf
Uncaught TypeError: saleItem.description is not a function
This is a Shirt
This is a did counted Shirt
Answer: A
NEW QUESTION # 56
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('onload', personalizeWebsiteContent);
- B. windows,addEventListener('DOMContent Loaded ', personalizeWebsiteContent);
- C. windows,addEventListener('load', personalizeWebsiteContent);
- D. windows,addEventListener('onDOMCContentLoaded', personalizeWebsiteContent);
Answer: C
NEW QUESTION # 57
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. New Promise(() => (throw 'cool error here'}).then(null, error => console.error(error)));
- B. Promise.reject('cool error here').then(error => console.error(error));
- C. Promise.reject('cool error here').catch(error => console.error(error));
- D. New Promise((resolve, reject) => (throw 'cool error here'}).catch(error => console.error(error)) ;
Answer: C,D
NEW QUESTION # 58
Given the code below:
Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?
- A. console.group(usersList) ;
- B. console.info(usersList) ;
- C. console.table(usersList) ;
- D. console.groupCol lapsed (usersList) ;
Answer: A
NEW QUESTION # 59
A developer has an ErrorHandler module that contains multiple functions.
What kind of export be leverages so that multiple functions can be used?
- A. Multi
- B. All
- C. Default
- D. Named
Answer: D
NEW QUESTION # 60
A developer wants to set up a secure web server with Node.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server?
- A. const https =require('https');
- B. const http =require('http');
- C. const server =require('secure-server');
- D. const tls = require('tls');
Answer: A
NEW QUESTION # 61
Given the code below:
What is logged to the console'
- A. 2 5 3 4 1
- B. 2 5 1 3 4
- C. 1 2 3 4 5
- D. 1 2 5 3 4
Answer: A
NEW QUESTION # 62
A developer wants to create an object from a function in the browser using the code below.
What happens due to the lack of the mm keyword on line 02?
- A. window.name is assigned to 'hello' and the variable = remains undefined.
- B. The m variable is assigned the correct object but this.name remains undefined.
- C. window.m Is assigned the correct object.
- D. The m variable is assigned the correct object.
Answer: A
NEW QUESTION # 63
Refer to the code below:
What is the result when the Promise in the execute function is rejected?
- A. Resolved1 Resolved2 Resolved3 Resolved4
- B. Rejected Resolved
- C. Rejected
- D. Rejected1 Rejected2 Rejected3 Rejected Rejected Rejected4
Answer: B
NEW QUESTION # 64
Which two console logs output NaN?
Choose 2 answers | |
- A. console.log(10 / Number('5) ) ;
- B. console.log(10 / 0);
- C. console.log(parseInt ' ("two')) ;
- D. console.loeg(10 / 'five');
Answer: C,D
NEW QUESTION # 65
Refer to the code below:
Async funct on functionUnderTest(isOK) {
If (isOK) return 'OK' ;
Throw new Error('not OK');
)
Which assertion accurately tests the above code?
- A. Console.assert (await functionUnderTest(true), ' OK ')
- B. Console.assert (await functionUnderTest(true), 'OK')
- C. Console.assert (await functionUnderTest(true), ' not OK ')
- D. Console.assert (await functionUnderTest(true), ' not OK ')
Answer: B
NEW QUESTION # 66
A developer is setting up a Node,js server and is creating a script at the root of the source code, index,js, that will start the server when executed. The developer declares a variable that needs the folder location that the code executes from.
Which global variable can be used in the script?
- A. _dirname
- B. _filename
- C. window.location
- D. this.path
Answer: B
NEW QUESTION # 67
Refer to the code below:
Const myFunction = arr => {
Return arr.reduce((result, current) =>{
Return result = current;
}, 10};
}
What is the output of this function when called with an empty array ?
- A. Returns NaN
- B. Returns 10
- C. Throws an error
- D. Returns 0
Answer: A
NEW QUESTION # 68
Refer to the code below:
let o = {
get js() {
let city1 = String("st. Louis");
let city2 = String(" New York");
return {
firstCity: city1.toLowerCase(),
secondCity: city2.toLowerCase(),
}
}
}
What value can a developer expect when referencing o.js.secondCity?
- A. ' new york '
- B. ' New York '
- C. An error
- D. Undefined
Answer: A
NEW QUESTION # 69
Which code statement below correctly persists an objects in local Storage ?
- A. const setLocalStorage = ( jsObject) => {
window.localStorage.setItem(jsObject);
} - B. const setLocalStorage = (storageKey, jsObject) => {
window.localStorage.setItem(storageKey, JSON.stringify(jsObject));
} - C. const setLocalStorage = (storageKey, jsObject) => {
window.localStorage.persist(storageKey, jsObject);
} - D. const setLocalStorage = ( jsObject) => {
window.localStorage.connectObject(jsObject));
}
Answer: B
Explanation:
NEW QUESTION # 70
Given the code below:
Setcurrent URL ();
console.log('The current URL is: ' +url );
function setCurrentUrl() {
Url = window.location.href:
What happens when the code executes?
- A. The url variable has local scope and line 02 executes correctly.
- B. The url variable has local scope and line 02 throws an error.
- C. The url variable has global scope and line 02 executes correctly.
- D. The url variable has global scope and line 02 throws an error.
Answer: C
NEW QUESTION # 71
Refer to code below:
console.log(0);
setTimeout(() => (
console.log(1);
});
console.log(2);
setTimeout(() => {
console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?
- A. 02413
- B. 02431
- C. 0
- D. 01234
Answer: A
NEW QUESTION # 72
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 # 73
......
Truly Beneficial For Your Salesforce Exam: https://www.actualpdf.com/CRT-600_exam-dumps.html
