Salesforce Javascript-Developer-I

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

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


Answer: D
Question 2

Refer to the code below:

8

Which value can a developer expect when referencing country,capital,cityString?


Answer: D
Question 3

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 4

Given two expressions var1 and var2. What are two valid ways to return the logical AND
of the two expressions and ensure it is data type Boolean ?
Choose 2 answers:


Answer: A,D
Question 5

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 numbers in the array, and the test passes.
A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.

Capture

Which two results occur when running this test on the updated sum3 function?
Choose 2 answers


Answer: B,D
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