<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>数组</title>
</head>
<body>
<script type="text/javascript">
/*
var arr1 = new Array("xiaozhang","a4","zhaolin");
var arr2 = ["tom","lily","adam"];
var arr3 = arr1.push( "kid" );//push方法作用是添加一个数组元素
document.write( "<br/>" );
document.write( arr1[0] + "-" + arr1[1] + "-" + arr1[2]);
document.write( "<br/>" );
document.write( arr2[0] + "-" + arr2[1] + "-" + arr2[2]);
*/
//数组对象
var arr = [];
arr[0] = "html5";
arr[1] = "css3";
arr[2] = "javascript";
document.write(arr.length);
</script>
</body>
</html>