JavaScript Language | 10 Minute Test


Instruction

  • Total number of questions : 10.
  • Time alloted : 10 minutes.
  • Each question carry 1 mark.
  • No Negative marks
  • DO NOT refresh the page.
  • All the best :-).

1.

The development environment offers which standard construct for data validation

A.
Super controlled loop constructs
B.
Case sensitivity check
C.
Validation constructs
D.
All of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

All these facilities are available in JavaScript. Additionally, all development environments provide syntax to create and use memory variables, constants, and functions.

2.

Which attribute is used to specify that the script is executed when the page has finished parsing ( only for external scripts )

A.
parse
B.
async
C.
defer
D.
type

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

In order to load a page, the browser must parse the contents of all script tags, which adds additional time to the page load. By minimizing the amount of JavaScript needed to render the page, and deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page.

3.

A proper scripting language is a

A.
High level programming language
B.
Assembly level programming language
C.
Machine level programming language
D.
Low level programming language

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

4.

JavaScript Code can be called by using

A.
RMI
B.
Triggering Event
C.
Preprocessor
D.
Function/Method

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

JavaScript code is as easy to be implemented and run. It can be called by using a function or a method.

5.

When there is an indefinite or an infinity value during an arithmetic value computation, javascript

A.
Prints an exception error
B.
Prints an overflow error
C.
Displays “Infinity‿
D.
Prints the value as such

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

When the result of a numeric operation is larger than the largest representable number (overflow), the result is a special infinity value, which JavaScript prints as Infinity. Similarly, when a negative value becomes larger than the largest representable negative number, the result is negative infinity, printed as -Infinity. The infinite values behave as you would expect: adding, subtracting, multiplying, or dividing them by anything results in an infinite value (possibly with the sign reversed).

6.

Assume that we have to convert “false‿ that is a non-string to string. The command that we use is (without invoking the “new‿ operator)

A.
false.toString()
B.
String(false)
C.
String newvariable=‿false‿
D.
Both a and b

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

A non-string can be converted in two ways without using a new operator. false.toString() and String(false).

7.

Consider the following snippet code

var string1 =123;
var intvalue = 123;
alert( string1 + intvalue );
The result would be

A.
123246
B.
246
C.
123123
D.
Exception

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

None.

8.

The JavaScript’s syntax calling ( or executing ) a function or method is called

A.
Primary expression
B.
Functional expression
C.
Invocation expression
D.
Property Access Expression

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

An invocation expression is JavaScript’s syntax for calling (or executing) a function or method. It starts with a function expression that identifies the function to be called.

9.

“An expression that can legally appear on the left side of an assignment expression.‿ is a well known explanation for variables, properties of objects, and elements of arrays. They are called

A.
Properties
B.
Prototypes
C.
Lvalue
D.
Definition

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

L-value is a historical term that means “an expression that can legally appear on the left side of an assignment expression.‿ In JavaScript, variables, properties of objects, and elements of arrays are lvalues.

10.

JavaScript is a _______________ language

A.
Object-Oriented
B.
High-level
C.
Assembly-language
D.
Object-Based

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

JavaScript is not a full-blown OOP (Object-Oriented Programming) language, such as Java or PHP, but it is an object-based language.

Submit your test now to view the Results and Statistics with answer explanation.