Y

Yashika • 3.75K Points
Extraordinary

Q. What will happen if we execute the following piece of code?

Code:
<script>  
  
var arr=[4,3,,1];    
  for(i=0;i<4;i++){  
document.writeln(arr[i]);  
}  
</script>  
  • (A) The output will be 4 3 1
  • (B) The output will be 4 3 undefined 1
  • (C) It will result in an error
  • (D) It does not run at all

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.