Math

OBJECT


Math Properties

Math.PI

Math.PI;

Math Methods

Math.abs

console.log(Math.abs(-10));

Math.trunc

console.log(Math.trunc(3.33)); // 3

Math.ceil

console.log(Math.ceil(3.33)); // 4

Math.floor

console.log(Math.floor(3.33)); // 3

Math.pow

console.log(Math.pow(2, 3)); //  2 ** 3 = 8

Math.random

console.log(Math.random()); //PSN 0...1