1-1一维数组

  1. <script>
  2. var arr=[1,2,3,4];
  3. var a=["html","123","name:ming"]
  4. console.log(a)
  5. </script>

1-2二维数组

  1. <script>
  2. var arr=[[1,2],[3,4]];
  3. console.log(arr[0][1]);//1
  4. console.log(arr[1][0]);//3
  5. </script>