CodesJava

Easy learning with example program codes

JavaScript math ceil() method

The JavaScript math ceil() method is used to get the smallest integer value, either greater than or equal to a number.
Syntax:

Math.ceil(n)

Parameters
n: It represents the number.

Returns
Smallest integer value which will be greater than or equal to the specified number.

Example

<!DOCTYPE html>
<html>
<body>
<script>  
document.writeln(Math.abs(-345));   
</script>  
</body>
</html>

Output

345
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status