Consider the following code snippet
function printArray(a)
{
Home | Discussion Forum
{
Home | Discussion Forum
Consider the following code snippet
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);
}
}
What does the above code result?
Answer : A
View More Related Question
1) Consider the following code snippet
function f(o)
{
if (o === undefined)
debugger;
}
What could be the task of the statement debugger?
View Answer
2) One of the special feature of an interpreter in reference with the for loop is that
View Answer
3) Consider the following code snippet
function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
Will the above code snippet work? If not, what will be the error?
View Answer
4) What are the three important manipulations done in a for loop on a loop variable?
View Answer
5) Among the keywords below, which one is not a statement?