Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js math round up

console.log(Math.ceil(0.2));
// expected output: 1

console.log(Math.ceil(4));
// expected output: 4

console.log(Math.ceil(7.004));
// expected output: 8

console.log(Math.ceil(-7.004));
// expected output: -7
 
PREVIOUS NEXT
Tagged: #js #math
ADD COMMENT
Topic
Name
8+2 =