A
Q. Consider the following code snippet. What will be the output?
Code:
function printArray(a)
{
var len = a.length, i = 0;
if (len == 0)
console.log("Empty Array");
else
{
do
{
console.log(a[i]);
} while (++i < len);
}
}
{
var len = a.length, i = 0;
if (len == 0)
console.log("Empty Array");
else
{
do
{
console.log(a[i]);
} while (++i < len);
}
}
- Correct Answer - Option(A)
- Views: 21
- Filed under category JavaScript
- Hashtags:
Discusssion
Login to discuss.