2018-10-16 21:32:40 +05:30

487 B

title
title
Nest one Array within Another Array

Nest one Array within Another Array

Arrays are one-dimensional; that means they store only one row of data. But you can make an array multi-dimensional by putting arrays inside arrays! Like so:

var arr = [["Two-dimensional", 2], ["Two rows", 12]];

The above array has two dimensions.