A
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);
}
}
{
varlen=x.length,i=0;
if(len==0)
console.log("Empty Array");
else
{
do
{
console.log(x[i]);
} while (++i<len);
}
}
- Correct Answer - Option(A)
- Views: 9
- Filed under category JavaScript
- Hashtags:
Discusssion
Login to discuss.