<script type="text/javascript"> var a=["3.3","-0.1","-9.9","8.9"]; for(var i=0;i<a.length;i++) { document.write(Math.round(a[i])); }
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
var a=[3.3,-0.1,-9.9,8.9];
for(i in a){
document.write(Math.round(a[i])+'<br/>');
}
</script>
</head>
<body>
</body>
</html>
diaodiaode