Examples:
let number = 10;
let number = 1.4;
Additional data types:
Infinityand-Infinity.NaN(not a number).
Working with math:
Math.round();
Useful functions:
const number = parseInt(someString);
const number = parseFloat(someString);
const thisIsNotANumber = isNaN(someVariable);
Tricks
Convert string to number:
const s = '5';
const number = +s;
// or:
const number = +'5';
Conversion to a number
Number('15'); // We will get a number type.
+'15'; // We will get a number type.
Andrew Dorokhov