Vidyalelo
JavaScript · Q12

Array And Function

Programming · JavaScript · question 12

Q12

Consider the following code snippet function printprops(o) for(var p in o) console.log(p + ": " + o[p] + "n"); What will the above code snippet result ?

A.
Prints the contents of each property of o
B.
Returns undefined
Answer
C.
All of the mentioned
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
The above code snippet returns undefined.