in JavaScript by
What will be the output of the following JavaScript code?

var o =newF();  // statement 1  

o.constructor=== F // statement 2  

a) False

b) 1

c) 0

d) True

1 Answer

0 votes
by

Answer: D

Reason: A "constructor " is a function property of any class that is typically used for object of that class . In the above given code, both 1,2 statements are creating the instance of the class.

Related questions

0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
...