Salesforce Javascript-Developer-I

Page:    1 / 44   
Total 217 questions | Updated On: Apr 22, 2024
Question 1

Refer to the 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 missing code for the code to display 'The truck 123AB has a
weight of 5000lb.


Answer: A
Question 2

What is the result of the code block?


Answer: D
Question 3

Refer to the code below:
Function changeValue(obj) {
Obj.value = obj.value/2;
}
Const objA = (value: 10);
Const objB = objA;
changeValue(objB);
Const result = objA.value;
What is the value of result after the code executes?


Answer: C
Question 4

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


Answer: D
Question 5

Refer to the following array:
Let arr = [1, 2, 3, 4, 5];
Which three options result in x evaluating as [1, 2]?
Choose 3 answer


Answer: A,B,C
Page:    1 / 44   
Total 217 questions | Updated On: Apr 22, 2024

Quickly grab our Javascript-Developer-I product now and kickstart your exam preparation today!

Name: Salesforce Certified JavaScript Developer I (WI24)
Exam Code: Javascript-Developer-I
Certification: Javascript Developer
Vendor: Salesforce
Total Questions: 217
Last Updated: Apr 22, 2024