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

Code:
functionfun()  
{  
var a=1;  
var b=2;  
return a*b;  
}  
document.write(fun());  
  • (A) 2
  • (B) 3
  • (C) 0
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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