Math.round()
The Math.round() method is a standard round function. Math.round() rounds up if the number is at least halfway to the next integer value (0.5 or higher) and rounds down if not.
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script type="text/javascript">
document.writeln(Math.round(25.9)); //26
document.writeln(Math.round(25.5)); //26
document.writeln(Math.round(25.1)); //25
</script>
</head>
<body>
</body>
</html>