A developer wants to create an object from a function in the browser using the code below:
Function Monster() { this.name = ‘hello’ };
Const z = Monster();
What happens due to lack of 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.
Answer: C
Latest JavaScript Developer I Dumps Valid Version with 144 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund