Basic javascript And Variables MCQ question and answer – 05

3
Created on By admin

Basic javascript And Variables MCQ question and answer - 05

1 / 10

1. 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?

 

 

2 / 10

2. What are the three important manipulations done in a for loop on a loop variable?

 

3 / 10

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?

 

 

4 / 10

4. One of the special feature of an interpreter in reference with the for loop is that

 

5 / 10

5. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?

 

6 / 10

6. What will be the step of the interpreter in a jump statement when an exception is thrown?

 

7 / 10

7. Consider the following code snippet
while (a != 0){   if (spam>a == 1)        continue;   else        a++;}

What will be the role of the continue keyword in the above code snippet?

 

 

8 / 10

8. Consider the following code snippet
function f(o) {     if (o === undefined) debugger;}

What could be the task of the statement debugger?

 

 

9 / 10

9. Among the keywords below, which one is not a statement?

 

10 / 10

10. The unordered collection of properties, each of which has a name and a value is called

 

Your score is

The average score is 30%

0%

Leave a Reply

Your email address will not be published. Required fields are marked *