Math.ceil()
Returns the smallest integer (whole number) greater than or equal to a number.
// returns 42
Math.ceil(42);
// returns 4
Math.ceil(3.14);
// Returns -3
Math.ceil(-3.14);
⏰ Preorder my new course on Web Components! Want to learn how to build Web Components from scratch, master best practices, and more? Preorder today and get $100 off of the launch price.
Find this useful? You can support my work by purchasing an annual membership.