Vidyalelo
JavaScript · all questions

Basic And Variables
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

83

Questions

3/5

Page

Pick an option on a question to see the right answer and solution.

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?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

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?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

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?

Select an option to see the answer and solution.

Consider the following code snippet

function f(o) 
{
     if (o === undefined) debugger;
}
What could be the task of the statement debugger?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

The object has three object attributes namely

Select an option to see the answer and solution.

Consider the following code snippet :
var book = {
    "main title": "JavaScript", 
    'sub-title': "The Definitive Guide", 
    "for": "all audiences", 
    author: { 
      firstname: "David", 
      surname: "Flanagan" 
    }
  };
In the above snippet, firstname and surname are

Select an option to see the answer and solution.

A linkage of series of prototype objects is called as :

Select an option to see the answer and solution.

Consider the below given syntax
book[datatype]=assignment_value;
In the above syntax, the datatype within the square brackets must be

Select an option to see the answer and solution.

To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the

Select an option to see the answer and solution.

Consider the following code snippet
function f() {};
The above prototype represents a

Select an option to see the answer and solution.

The purpose of extensible attribute is to

Select an option to see the answer and solution.

Identify the process done in the below code snippet
o = {x:1, y:{z:[false,null,""]}}; 
s = JSON.stringify(o); 
p = JSON.parse(s);

Select an option to see the answer and solution.

The basic purpose of the toLocaleString() is to

Select an option to see the answer and solution.

Javascript is _________ language.

Select an option to see the answer and solution.