List of questions
Related questions
Question 213 - Certified JavaScript Developer I discussion
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 developer creates 1000 monster objects.
How many growl methods are created with Option A and Option B?
A.
1000 for Option A, 1 for Option B
B.
1 methods for both
C.
1000 for both
D.
1 for Option A, 1000 for Option B
Your answer:
0 comments
Sorted by
Leave a comment first