Q. Consider the following code snippet.
What will the above code snippet result ?

Code:
function output(n) 
{
    for(var v in n)
      console.log(v + ": " + n[v] + "\n");
}
  • (A) prints only one property
  • (B) Prints the contents of each property of n
  • (C) prints the address of elements
  • (D) Returns undefined
πŸ’¬ Discuss
βœ… Correct Answer: (D) Returns undefined

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
292
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Vishal Gupta
Publisher
πŸ“ˆ
85%
Success Rate