Round a float up to the next integer in javascript

Use the Math.ceil[MDN] function

var n = 4.3;
alert(Math.ceil(n)); //alerts 5

Leave a Comment