Q. Can we put ; after for loop in Javascript? find the output of below code
Code:
<script>
for(var i=0;i<5;i++);
{
document.write(i++);
}
</script>
β
Correct Answer: (A)
5