Time Left : 00 : 30 : 00

What will be the output of the following JavaScript 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);
     }
}
printArray([
    1, 2, 3, 4, 5
]);

 

Correct Answer : A

What function will convert a JavaScript object to a JSON string?

Correct Answer : A

Which of the following are the errors in JavaScript?

Correct Answer : B

What must be done in order to implement Lexical Scoping?

Correct Answer : C

What is the fundamental rule of lexical scoping?

Correct Answer : B

Which of the following is not the properties of screen objects in JavaScript?

Correct Answer : B

Javascript is ideal to?

Correct Answer : B

Which of the following function of Array object applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value?

Correct Answer : D

Which built-in method reverses the order of the elements of an array?

Correct Answer : B

Which of these is supported as a JSON Value type?

Correct Answer : B

What does javascript use instead of == and !=?

Correct Answer : B

The _______ method of an Array object adds and/or removes elements from an array

Correct Answer : D

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

Correct Answer : C

Which of the following function of String object causes a string to be displayed in the specified size as if it were in a <font size = 'size'> tag?

Correct Answer : C

Which statement about the space parameter in JSON.stringify() is false?

Correct Answer : C

Choose the correct JavaScript syntax to change the content of the following HTML code.

Correct Answer : B

Which of the following function of Number object returns a string value version of the current number?

Correct Answer : A

What keywords are reserved in JSON and cannot be used as keys?

Correct Answer : C

Which of the following is a valid JSON string?

Correct Answer : B

What is the purpose of script loading?

Correct Answer : C

When coding a string object in JSON, what must separate the string and the value?

Correct Answer : D

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

Correct Answer : B

What are the two basic groups of dataypes in JavaScript?

Correct Answer : C

What is the file extension of JSON?

Correct Answer : D

What if you use parseInt() to convert a string containing decimal value?

Correct Answer : C

The escape sequence ‘\f’ stands for

Correct Answer : D

What is defination of an undefined value in JavaScript?

Correct Answer : D

Why so JavaScript and Java have similar name?

Correct Answer : B

Which of the following code will return a valid JSON object?

Correct Answer : D

A proper scripting language is a

Correct Answer : A