A

Admin • 833K Points
Coach

Q. What is the output of below Javascript code if user keeps the default value of prompt box?

Code:
<script>
var question = "Your species?";
var defaultAns = "human";
var out = prompt(question, defaultAns);
document.write(out);
</script>
  • (A) human
  • (B) Error
  • (C) NaN
  • (D) Nothing is printed
  • Correct Answer - Option(A)
  • Views: 15
  • 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.