Q. Which one of the following options is the correct output for the given code of JavaScript?

Code:
<script>  
functionprintprops(o)  
{  
for(var ain o)  
console.log(a+": "+ o[a]+"\n");  
}  
</script>  
  • (A) Prints the contents of each property of o
  • (B) Prints the address of elements
  • (C) Prints only one property
  • (D) Returns undefined
πŸ’¬ Discuss
βœ… Correct Answer: (D) Returns undefined

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
266
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Yashika
Publisher
πŸ“ˆ
80%
Success Rate