So I started learning javascript a week ago and I got confused. I learned two objects. Math.floor and Math.ceil but I haven’t understood their difference. Can somebody help me?

We can consult documentation:

Math.ceil() - JavaScript | MDN

Math.floor() - JavaScript | MDN

The ** Math.ceil()** function always rounds a number up to the next largest integer.

The

**function returns the largest integer less than or equal to a given number.**

`Math.floor()`

**Unless**… That number is zero. Then it stays zero.