14 lines
487 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Nest one Array within Another Array
---
## Nest one Array within Another Array
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
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:
```javascript
var arr = [["Two-dimensional", 2], ["Two rows", 12]];
```
The above array has two dimensions.