JavaScript Variables


JavaScript Variables

  1. JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.











  1. 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).


  1. The generalised syntax for a real number representation is __________











  1. 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.



  1. A hexadecimal literal begins with __________











  1. 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.


  1. The type of a variable that is volatile is _______________











  1. 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.



  1. JavaScript Code can be called by using ___________











  1. 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.