关于向下取整floor(),为什么我这样不行?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
var array =[3.3,-0.1,-9.9,8.9]
if(var i=0; i<array.length; i++){
document.write(Math.floor(array[i]));
}
</script>
</head>
<body>
</body>
</html>