ExamGecko
Ask Question

Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 21

Add to Whishlist

List of questions

Question 201

Report Export Collapse

A developer has an is Dog function that takes one argument cat. They want to schedule the function to run every minute.

What is the correct syntax for scheduling this function?

Become a Premium Member for full access
  Unlock Premium Member

Question 202

Report Export Collapse

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.`)

}}l

et myDog = new Dog('Puppy');

myDog.makeSound();

What is the console output?

Become a Premium Member for full access
  Unlock Premium Member

Question 203

Report Export Collapse

Given the HTML below:

Salesforce Certified JavaScript Developer I image Question 203 63874 09232024002545000000

Which statement adds the priority-account css class to the Applied Shipping row?

Become a Premium Member for full access
  Unlock Premium Member

Question 204

Report Export Collapse

Refer to the following code:

Salesforce Certified JavaScript Developer I image Question 204 63875 09232024002545000000

Become a Premium Member for full access
  Unlock Premium Member

Question 205

Report Export Collapse

Refer to the HTML below:

Salesforce Certified JavaScript Developer I image Question 205 63876 09232024002545000000

Which JavaScript statement results in changing " The Lion."?

Become a Premium Member for full access
  Unlock Premium Member

Question 206

Report Export Collapse

Refer to the code below:

Salesforce Certified JavaScript Developer I image Question 206 63877 09232024002545000000

Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a specific element, myElement on the page had been clicked?

Become a Premium Member for full access
  Unlock Premium Member

Question 207

Report Export Collapse

Given the following code:

let x = null;

console.log(typeof x);

What is the output?

Become a Premium Member for full access
  Unlock Premium Member

Question 208

Report Export Collapse

Refer to the code below:

let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in"));

let car2 = new Promise(resolve => setTimeout(resolve,1500,"Car2 completed"));

let car3 = new Promise(resolve => setTimeout(resolve,3000,"Car3 completed"));

Promise.race([car1,car2,car3])

.then(value=>{

let result = `${value} the race.`;

}).catch(err=>{

console.log('Race is cancelled.',err);

});

What is the value of result when promise.race execues?

Become a Premium Member for full access
  Unlock Premium Member

Question 209

Report Export Collapse

Given the code below:

const delay = async delay =>{

return new Promise((resolve,reject)=>{

console.log(1);

setTimeout(resolve,deleay);

});

};

const callDelay = async ()=>{

console.log(2);

const yup = await delay(1000);

console.log(3);

}

console.log(4);

callDelay();

console.log(5);

What is logged to the console?

Become a Premium Member for full access
  Unlock Premium Member

Question 210

Report Export Collapse

A developer writes the code below to calculate the factorial of a given number

function sum(number){

return number * sum(number-1);

}

sum(3);

what is the result of executing the code.

Become a Premium Member for full access
  Unlock Premium Member
Total 224 questions
Go to page: of 23
Search

Related questions