How to round up in JavaScript?

To round up in JavaScript, call the Math.ceil function.

Here's how you do it:

const number = 3.03;
const roundedUp = Math.ceil(number);

console.log(roundedUp); // 4