A

Admin • 833K Points
Coach

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

Code:
function display1(option)
{
return(option ? "true" : "false");
}
bool ans=true;
console.log(display1(ans));
  • (A) False
  • (B) True
  • (C) Runtime error
  • (D) Compilation error
  • Correct Answer - Option(B)
  • Views: 31
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.