JavaScript Numbers

JavaScript has only one type of number. Numbers can be written with or without decimals.

Example

let x = 3.14;    // A number with decimals
let y = 3;       // A number without decimals

 

Extra large or extra small numbers can be written with scientific (exponent) notation:

Example

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

Continue reading JavaScript Numbers