Salesforce Javascript Developer I Salesforce Certified JavaScript Developer I Exam Practice Test

Page: 1 / 14
Total 224 questions
Question 1

A developer has the function, shown below, that is called when a page loads.

Where can the developer see the log statement after loading the page in the browser?



Answer : A


Question 2

A developer has two ways to write a function:

Option A:

function Monster(){

this.growl = ()=>{

console.log('Grr!');

}

}

Option B:

function Monster(){};

Monster.prototype.growl = ()=>{

console.log('Grr!');

}

After deciding on an option, the developercreates 1000 monster objects.

How many growl methods are created with Option A and Option B?



Answer : B


Question 3

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?



Answer : A


Question 4

Given the HTML below:

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



Answer : A


Question 5

Refer to the following code block:

class Animal{

constructor(name){

this.name = name;

}

makeSound(){

console.log(`${this.name} ismaking 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?



Answer : A


Question 6

Refer to the code declarations below:

Which three expressions return the string JavaScript?

Choose 3 answers



Answer : B, D, E


Question 7

Refer to the following code:

What is the value of output on line 11?



Answer : D


Page:    1 / 14   
Total 224 questions