JavaScript Math Reference
Basic Rounding Functions Math.floor(x) -> Always rounds DOWN to nearest integer Math.floor(4.9); // 4 Math.floor(4.1); // 4 Math.floor(-4.1); // -5 (down means more negative) Math.floor(-4.9); // -5 Math.ceil(x) -> Always rounds UP to nearest intege...







