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

Code:
functionoutputfun(object)  
{  
    var place=object ?object.place: "Italy";  
    return "clean:"+ place;  
}  
console.log(outputfun({place:India}));  
  • (A) Error
  • (B) clean:Italy
  • (C) clean:India
  • (D) undefined
πŸ’¬ Discuss
βœ… Correct Answer: (C) clean:India

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
233
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Akshay Kulkarni
Publisher
πŸ“ˆ
87%
Success Rate