Notifications
Clear all

Option A:

1 Posts
1 Users
0 Likes
100 Views
(@salterslloyd)
Posts: 746
Noble Member
Topic starter
 

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 Option B?

A. 1 growl method is created for Option A. 1000 growl methods are created for Option B.

B. 1000 growl method is created for Option A. 1 growl methods are created for Option B.

C. 1000 growl methods are created regardless of which option is used.

D. 1 growl method is created regardless of which option is used.

Show Answer Hide Answer

Suggested Answer: B
 
Posted : 11/02/2023 10:56 am

Latest Salesforce JavaScript Developer I Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: