floor ceiling javascript code example Example: javascript ceiling var ceiling1 = Math.ceil(4.7); //5 var ceiling2 = Math.ceil(-3.4); //-3