41. 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?
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);
}
}
42. What are the three important manipulations done in a for loop on a loop variable?
43. 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?
function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
44. One of the special feature of an interpreter in reference with the for loop is that
45. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
Read More Section(Basic and Variables)
Each Section contains maximum 70 questions. To get more questions visit other sections.