Javascript Array Multidimensional array Create

Description

Javascript Array Multidimensional array Create


let personnel = [];

personnel[0] = [];// w ww  . j  a  v  a  2s  . co m
personnel[0][0] = "Name0";
personnel[0][1] = "Age0";
personnel[0][2] = "Address0";

personnel[1] = [];
personnel[1][0] = "Name1";
personnel[1][1] = "Age1";
personnel[1][2] = "Address1";

personnel[2] = [];
personnel[2][0] = "Name2";
personnel[2][1] = "Age2";
personnel[2][2] = "Address2";

console.log("Name : " + personnel[1][0]);
console.log("Age : " + personnel[1][1]);
console.log("Address : " + personnel[1][2]);



PreviousNext

Related