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 23 in JavaScript by sharadyadav1986
0 votes
asked Mar 21 in JavaScript by rajeshsharma