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

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

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

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:











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