四舍五入round()
任务
补充右边编辑器代码,在script标签内,使用round()方法,计算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.round(3.3)+"<br/>");
document.write(Math.round(-0.1)+"<br/>");
document.write(Math.round(-9.9)+"<br/>");
document.write(Math.round(8.9));
</script>
</head>
<body>
</body>
</html>