JavaScript 数组定义及其操作
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
var array = new Array(1,2,3);
alert(array);
console.log(array);
var array2 =[1,2,3,4,5,6];
console.log(array2);
var array3 = [
[1,2,3],
[4,5,6]];
console.log(array3);
alert(array3[0][1])
alert(array3.length );
array3.push("hello");
array3.pop();
alert(array3) ;
array3.slice(1,0,"苹果");
</script>
</head>
<body>
</body>
</html>