A

Admin • 833K Points
Coach

Q. What output we may get if we execute the following JavaScript code

Code:
<script>
function myFunction() {

var i;
for (i = 0; i< 5; i++) {
if (i === 3) {
continue;
}
document.write(i);
}

}
myFunction();
</script>
  • (A) 0124
  • (B) 01234
  • (C) It will throw a error
  • (D) No output
  • Correct Answer - Option(A)
  • Views: 19
  • 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.