QUIZ ON : WEB DESIGNING AND PUBLISHING - JAVSCRIPT AND ANGULAR JS

JAVSCRIPT AND ANGULAR JS

00:00:00

When does the function name become optional in JavaScript?

Option A. When the function is defined as a looping statement
Option B. When the function is defined as expressions
Option C. When the function is predefined
Option D. All of the above
True Answer B

Explanation :
The function name is optional for functions defined as expressions. A function declaration statement actually declares a variable and assigns a function object to it.

When does the function name become optional in JavaScript?

Question No# : 01 out of 10

JavaScript Code can be called by using

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

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

JavaScript Code can be called by using

Question No# : 02 out of 10

A hexadecimal literal begins with

Option A. 00
Option B. 0x
Option C. 0X
Option D. Both 0x and 0X
True Answer D

Explanation :
Generally, X or x denotes hexadecimal values. So, any integer literal that begins with 0X or 0x denotes a hexadecimal number.

A hexadecimal literal begins with

Question No# : 03 out of 10

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

Option A. Prints an exception error
Option B. Prints an overflow error
Option C. Displays “Infinity”
Option D. Prints the value as such
True Answer 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.

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

Question No# : 04 out of 10

The statement a===b refers to

Option A. Both a and b are equal in value, type and reference address
Option B. Both a and b are equal in value
Option C. Both a and b are equal in value and type
Option D. None of these
True Answer C

Explanation :
a==b returns a true if a and b refer to the same object ,so they are equal, else it returns a false.

The statement a===b refers to

Question No# : 05 out of 10

The type of a variable that is volatile is

Option A. Volatile variable
Option B. Mutable variable
Option C. Immutable variable
Option D. Dynamic variable
True Answer B

Explanation :
The variables whose values can be changed are called mutable variable types.

The type of a variable that is volatile is

Question No# : 06 out of 10

Which of the following is not considered as an error in JavaScript?

Option A. Syntax error
Option B. Missing of semicolons
Option C. Division by zero
Option D. None of these
True Answer C

Explanation :
Division by zero is not an error in JavaScript: it simply returns infinity or negative infinity. There is one exception, however: zero divided by zero does not have a welldefined value, and the result of this operation is the special not-a-number value, printed as NaN.

Which of the following is not considered as an error in JavaScript?

Question No# : 07 out of 10

The snippet that has to be used to check if “a” is not equal to “null” is

Option A. if(a!=null)
Option B. if (!a)
Option C. if(a!null)
Option D. if(a!==null)
True Answer D

Explanation :
The not-equal operator !== compares o to null and evaluates to either true or false.

The snippet that has to be used to check if “a” is not equal to “null” is

Question No# : 08 out of 10

The function definitions in JavaScript begins with

Option A. Identifier and Parantheses
Option B. Return type and Identifier
Option C. Return type, Function keyword, Identifier and Parantheses
Option D. Identifier and Return type
True Answer A

Explanation :
The function definitions begin with the keyword function followed by an identifier that names the function and a pair of parantheses around a comma-separated list of zero or more identifiers.

The function definitions in JavaScript begins with

Question No# : 09 out of 10

Client-side scripts can perform many functions such as data validation and provide interactive feedback to the user.

Option A. TRUE
Option B. FALSE
Option C.
Option D.
True Answer A

Explanation :

Client-side scripts can perform many functions such as data validation and provide interactive feedback to the user.

Question No# : 10 out of 10