Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 15 Topic 2 Discussion

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 15 Topic 2 Discussion

JavaScript-Developer-I Exam Topic 2 Question 15 Discussion:
Question #: 15
Topic #: 2

JavaScript:

01 function Tiger() {

02 this.type = ' Cat ' ;

03 this.size = ' large ' ;

04 }

05

06 let tony = new Tiger();

07 tony.roar = () = > {

08 console.log( ' They\ ' re great! ' );

09 };

10

11 function Lion() {

12 this.type = ' Cat ' ;

13 this.size = ' large ' ;

14 }

15

16 let leo = new Lion();

17 // Insert code here

18 leo.roar();

Which two statements could be inserted at line 17 to enable line 18?


A.

leo.roar = () = > { console.log( ' They\ ' re pretty good! ' ); };


B.

Object.assign(leo, tony);


C.

Object.assign(leo, Tiger);


D.

leo.prototype.roar = () = > { console.log( ' They\ ' re pretty good! ' ); };


Get Premium JavaScript-Developer-I Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.