Free Certified JavaScript Developer I Exam Braindumps
Salesforce Certified JavaScript Developer I Questions 66–70 (page: 15)

Updated On: 10-Feb-2026

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?

  1. Car3 completes the race
  2. Car 2 completed the race.
  3. Car 1 crashed in the race.
  4. Race is cancelled.

Answer(s): B



Refer to the following code:
Let sampleText = `The quick brown fox jumps';
A developer needs to determine if a certainsubstring is part of a string.
Which three expressions return true for the given substring ? Choose 3 answers

  1. sampleText.includes(`fox');
  2. sampleText.includes(` quick ', 4);
  3. sampleText.includes(` Fox ', 3)
  4. sampleText.includes(` fox ');
  5. sampleText.includes(` quick ') !== -1;

Answer(s): B,D,E



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:

  1. Boolean(var1 && var2)
  2. var1 && var2
  3. var1.toBoolean() && var2toBoolean()
  4. Boolean(var1) && Boolean(var2)

Answer(s): A,D



Cloud Kicks has a class to represent items for sale in an online store, as shown below:
Class Item{
constructor (name, price){
this.name = name;
this.price = price;
}
formattedPrice(){
return `s' + String(this.price);}}
A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.
Which line of code properly declares the clothingItem class such that it inherits from Item?

  1. Class ClothingItem implements Item{
  2. Class ClothingItem {
  3. Class ClothingItem super Item {
  4. Class ClothingItem extends Item {

Answer(s): D



Refer to the code below:



Line 05 causes an error.
What are the values of greeting and salutation once code completes?

  1. Greeting is Hello and salutation is Hello, Hello.
  2. Greeting is Goodbye and salutation is Hello, Hello.
  3. Greeting is Goodbye and salutation is I say Hello.
  4. Greeting is Hello and salutation is I say hello.

Answer(s): A



Viewing page 15 of 46
Viewing questions 71 - 75 out of 224 questions


Post your Comments and Discuss Salesforce Certified JavaScript Developer I exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!