Home > Web Front-end > JS Tutorial > body text

定义JavaScript二维数组采用定义数组的数组来实现_基础知识

WBOY
Release: 2016-05-16 17:47:15
Original
1025 people have browsed it

1. javaScript没有提供直接定义二维数组的方法,但可以使用定义数组的数组来定义JavaScript二维数组:例如定义一个 4X3二维数组a可以采用如下方法:
var a=new Array();
a[0]=new Array();
a[1]=new Array();
a[2]=new Array();
a[3]=new Array();
下面是一个事例

复制代码 代码如下:











Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!