

MCQOPTIONS
Saved Bookmarks
1. |
Consider the following code snippetfunction printArray(a){var len = a.length, i = 0;if (len == 0)console.log("Empty Array");else{do{console.log(a[i]);} while (++i < len);}}What does the above code result? |
A. | rints the numbers in the array in order |
B. | rints the numbers in the array in the reverse order |
C. | rints 0 to the length of the array |
D. | rints “Empty Array” |
Answer» B. rints the numbers in the array in the reverse order | |