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

A developer wants to create an object from a function in the browser using the code below.

What happens due to the lack of the mm keyword on line 02?



Answer : A


Question 7

A developer has the following array of hourly wages:

Let arr = (8, 5, 9, 75, 11, 25, 7, 75, , 13, 25);

For workers making less than $10 an hour rate should be multiple by 1.25 and returned in a new array.

How should the developer implement the request?



Answer : C


Page:    1 / 14   
Total 224 questions