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());
β
Correct Answer: (A)
2
functionfun()
{
var a=1;
var b=2;
return a*b;
}
document.write(fun());
You must be Logged in to update hint/solution