Math 객체의 ceil() 함수는 부동 소수점 숫자를 받아들이고 주어진 숫자보다 크거나 같은 가장 가까운 정수를 반환합니다. 주어진 숫자 자체가 정수인 경우 이 함수는 동일한 값을 반환합니다.
구문
구문은 다음과 같습니다.
Math.ceil(169.36)
예시
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.ceil(169.36);
document.write("ceil value of the of the given number: "+result);
</script>
</body>
</html> 출력
ceil value of the of the given number: 170