Math.ceil()
In this chapter you will learn:
ceiling method
The Math.ceil()
method is the ceiling function.
Math.ceil()
rounds numbers up to the nearest integer value.
<!DOCTYPE html><!--from j a va2s. c o m-->
<html>
<head>
<script type="text/javascript">
document.writeln(Math.ceil(25.9)); //26
document.writeln(Math.ceil(25.5)); //26
document.writeln(Math.ceil(25.1)); //26
</script>
</head>
<body>
</body>
</html>
Next chapter...
What you will learn in the next chapter: