A

Admin • 833K Points
Coach

Q. 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
  • (C) All of the mentioned
  • (D) None of the mentioned
  • Correct Answer - Option(B)
  • Views: 21
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

The above code snippet returns undefined.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.