in JavaScript by
Which one of the following is correct output for the following given JavaScript code:

var  obj=  





if('breadth' in obj === false)   


    obj.breadth = 12;  




a) Error

b) Undefined

c) 12

d) 20

1 Answer

0 votes

Answer: C

Reason: In the above given JavaScript code, the "in" operator is used which checks (or performs search) for the specific property. If the certain property is found it returns true otherwise it returns false.

Related questions

0 votes
asked Mar 22, 2021 in JavaScript by Robindeniel
0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986