## 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?

## 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

## 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

## 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

## 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

## 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

## How do you find the number with the highest value of x and y?

Option A. ceil(x, y)

Option B. Math.max(x, y)

Option C. top(x, y)

Option D. Math.ceil(x, y)

True Answer B

##### Explanation :

### How do you find the number with the highest value of x and y?