Q. Which of the following is the correct output for the following JavaScript code:
Code:
functiondisplayArray(x)
{
varlen=x.length,i=0;
if(len==0)
console.log("Empty Array");
else
{
do
{
console.log(x[i]);
} while (++i<len);
}
}
β
Correct Answer: (A)
Prints the numbers in the array in specific order