πŸ“Š JavaScript
Q. What if we put ++ operator inside if condition? find the output of below code
Code:
<script>
var a = 10;
if(a == a++)
document.write(a);
</script>
  • (A) 10
  • (B) 11
  • (C) Error
  • (D) Nothing is printed
πŸ’¬ Discuss
βœ… Correct Answer: (B) 11

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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