Undefined array is a condition that occurred when a user want to print an array element more than the declared size of element that an array object hold in it.
In the same way, for loop execute the script and return you true till the variable i is less than array length. Incase the array length is more than the declared variable, then document. write print the undefined array on the browser.
Output of the program
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial