πŸ“Š JavaScript
Q. What if we put ; after if? does it really affect? Find the output of below Javascript
Code:
<script>
 var a = 10;
 if(a == 20);
 document.write(a);
</script>

  • (A) 10
  • (B) 20
  • (C) Nothing is printed
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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