Multiple choice

What will be the output of the following code? document.write(typeof(24.49));

  1. float

  2. number

  3. integer

  4. double

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In JavaScript, there is no separate data type for integers or floating-point numbers. All numbers are represented as double-precision 64-bit binary format IEEE 754 values, which belong to the single primitive type 'number'.