πŸ“Š JavaScript
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) human

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
177
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
92%
Success Rate