1.

Consider the following code snippet.
function printArr(n) 
{
var len = n.length, p = 2;
if (len == 2)
console.log("Nothing is in Array");
else
{
do
{
console.log(n[p]);
} while (++p < len);
}
}

What does the above code result?

A. Prints the numbers in the array in the reverse order
B. Prints the numbers in the array in order
C. Prints Nothing is in Array
D. Prints 2 to the length of the array
E. None of these
Answer» C. Prints Nothing is in Array


Discussion

No Comment Found