2018-09-30 23:01:58 +01:00
---
id: cf1111c1c11feddfaeb7bdef
title: Nest one Array within Another Array
challengeType: 1
2019-02-14 12:24:02 -05:00
videoUrl: 'https://scrimba.com/c/crZQZf8'
2019-07-31 11:32:23 -07:00
forumTopicId: 18247
2018-09-30 23:01:58 +01:00
---
## Description
< section id = 'description' >
2019-11-29 10:07:51 +01:00
You can also nest arrays within other arrays, like this: < code > [["Bulls", 23], ["White Sox", 45]]< / code > . This is also called a < dfn > multi-dimensional array< dfn > .
2018-09-30 23:01:58 +01:00
< / section >
## Instructions
< section id = 'instructions' >
Create a nested array called < code > myArray< / code > .
< / section >
## Tests
< section id = 'tests' >
```yml
2018-10-04 14:37:37 +01:00
tests:
- text: < code > myArray</ code > should have at least one array nested within another array.
2019-07-13 00:07:53 -07:00
testString: assert(Array.isArray(myArray) & & myArray.some(Array.isArray));
2018-09-30 23:01:58 +01:00
```
< / section >
## Challenge Seed
< section id = 'challengeSeed' >
< div id = 'js-seed' >
```js
// Example
var ourArray = [["the universe", 42], ["everything", 101010]];
// Only change code below this line.
var myArray = [];
```
< / div >
### After Test
< div id = 'js-teardown' >
```js
2018-10-20 21:02:47 +03:00
if(typeof myArray !== "undefined"){(function(){return myArray;})();}
2018-09-30 23:01:58 +01:00
```
< / div >
< / section >
## Solution
< section id = 'solution' >
```js
var myArray = [[1,2,3]];
```
< / section >