Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

math ceil

// There are many ways of rounding...
Math.ceil(5.5) // Answer 6, rounds up.
Math.round(5.5) // Answer 6, rounds to the closest whole number.
Math.floor(5.5) // Answer 5, rounds down.

// ceil is short for ceiling(up), floor is down...
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #math #ceil
ADD COMMENT
Topic
Name
5+7 =