In JavaScript, Number is a data type used to represent both integers and floating-point numbers.
let age = 25;
let price = 99.99;
10, -53.14, 0.51e5
console.log(Infinity); // Infinity
console.log(-Infinity); // -Infinity
console.log(NaN); // Not a Number
let num = 10.567;
num.toFixed(2); // "10.57"
Number("100"); // 100
parseInt("50px"); // 50
parseFloat("3.14"); // 3.14
Click the button to see number operations in action: