Math.floor() - Math.floor() - The
Math.floor()
method rounds a number DOWN to the nearest integer. - Метод Math.floor() округляет число DOWN до ближайшего целого.
Näide:
let a = Math.floor(0.60);
let b = Math.floor(0.40);
let c = Math.floor(5);
let d = Math.floor(5.1);
let e = Math.floor(-5.1);
let f = Math.floor(-5.9);