Skip to main content

Numbers

Info:

  • Javascript numbers are always one type: double (64-bit floating point).

  • All JavaScript numbers are stored as decimal numbers (floating point).

    // With decimals:
    let x1 = 34.00;

    // Without decimals:
    let x2 = 34;
  • Extra large or extra small numbers can be written with scientific (exponential) notation.

    let y = 123e5;    // 12300000
    let z = 123e-5; // 0.00123