Q. What happens when we run this code?

Code:
function dog() {
   print("I am a dog.");
}
dog.sound = "Bark";
  • (A) Syntax Error
  • (B) “I am a dog” gets printed
  • (C) ReferenceError
  • (D) Nothing happens
πŸ’¬ Discuss
βœ… Correct Answer: (D) Nothing happens

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
243
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
91%
Success Rate