Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 52 Topic 6 Discussion

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 52 Topic 6 Discussion

JavaScript-Developer-I Exam Topic 6 Question 52 Discussion:
Question #: 52
Topic #: 6

At Universal Containers, every team has its own way of copying JavaScript objects. The

code

Snippet shows an implementation from one team:

Function Person() {

this.firstName = “John”;

this.lastName = ‘Doe’;

This.name =() => (

console.log(‘Hello $(this.firstName) $(this.firstName)’);

)}

Const john = new Person ();

Const dan =JSON.parse(JSON.stringify(john));

dan.firstName =’Dan’;

dan.name();

What is the Output of the code execution?


A.

Hello Dan Doe


B.

Hello John DOe


C.

TypeError: dan.name is not a function


D.

TypeError: Assignment to constant variable.


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.