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
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
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
Given the HTML below:
Which statement adds the priority-account css class to the Applied Shipping row?
Answer : A
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
Refer to the code declarations below:
Which three expressions return the string JavaScript?
Choose 3 answers
Answer : B, D, E
Refer to the following code:
What is the value of output on line 11?
Answer : D