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

Exam JavaScript-Developer-I All Questions
Exam JavaScript-Developer-I All Questions

View all questions & answers for the JavaScript-Developer-I exam

Salesforce Developer JavaScript-Developer-I Question # 48 Topic 5 Discussion

JavaScript-Developer-I Exam Topic 5 Question 48 Discussion:
Question #: 48
Topic #: 5

A developer wants to create an object from afunction in the browser using the code

below:

Function Monster() { this.name = ‘hello’ };

Const z = Monster();

What happens due to lackof the new keyword on line 02?


A.

The z variable is assigned the correct object.


B.

The z variable is assigned the correct object but this.name remains undefined.


C.

Window.name is assigned to ‘hello’ and the variable z remains undefined.


D.

Window.m is assigned the correct object.


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.