Home >Web Front-end >JS Tutorial >Defining a JavaScript two-dimensional array is implemented using an array of defined arrays_Basic knowledge

Defining a JavaScript two-dimensional array is implemented using an array of defined arrays_Basic knowledge

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:47:151148browse

1. JavaScript does not provide a method to directly define a two-dimensional array, but you can use the array that defines the array to define a JavaScript two-dimensional array: For example, to define a 4X3 two-dimensional array a, you can use the following method:
var a=new Array() ;
a[0]=new Array();
a[1]=new Array();
a[2]=new Array();
a[3]=new Array ();
The following is an example

Copy code The code is as follows:











Statement:
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