Utilizor
Contact Us

Number Basics

Working with numbers.

Number Basics

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

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