Langit -langit Javascript
var ceiling1 = Math.ceil(4.7); //5
var ceiling2 = Math.ceil(-3.4); //-3
Grepper
var ceiling1 = Math.ceil(4.7); //5
var ceiling2 = Math.ceil(-3.4); //-3
Math.ceil(1.2);
// 2
Math.ceil(x); //This equals the next whole number after x. X must be a double.
//Example use:
x = Math.ceil(x);
//Now x is equal to x rounded up.
Math.ceil()