JS Scientific Notation
Syntax
Scientific notation in JavaScript is used to represent numbers as mantissa × 10^exponent, written as mantissaEexponent.
let scientificNumber = 1.23e4; // Represents 1.23 × 10^4 (12300)scientificNumber = 1.23E4; // Represents 1.23 × 10^4 (12300)
scientificNumber = 1.23e-4; // Represents 1.23 × 10^-4 (0.000123)scientificNumber = 1.23E-4; // Represents 1.23 × 10^-4 (0.000123)