向上取整ceil()
任务
在右边编辑器中补充代码,在script标签内,使用ceil()方法,计算3.3、-0.1、-9.9、8.9值。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
document.write(Math.ceil(3.3)+"<br/>");
document.write(Math.ceil(-0.1)+"<br/>");
document.write(Math.ceil(-9.9)+"<br/>");
document.write(Math.ceil(8.9));
</script>
</head>
<body>
</body>
</html>