JavaScript Variables
- JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
When the result of a numeric operation is larger than the largest represent able number (overflow), JavaScript prints the value as Infinity. Similarly, when a negative value becomes larger than the largest represent able negative number, the result is negative 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).
- The generalised syntax for a real number representation is __________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Floating-point literals may also be represented using exponential notation: a real number followed by the letter e (or E), followed by an optional plus or minus sign, followed by an integer exponent. This notation represents the real number multiplied by 10 to the power of the exponent.
- A hexadecimal literal begins with __________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Generally, X or x denotes hexadecimal values. So, any integer literal that begins with 0X or 0x denotes a hexadecimal number.
- The type of a variable that is volatile is _______________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The variables whose values can be changed are called mutable variable types. In JavaScript, only objects and arrays are mutable, not primitive values.
- JavaScript Code can be called by using ___________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
JavaScript code can be called by making a function call to the element on which JavaScript has to be run. There are many other methods like onclick, onload and onsubmit etc.