2018-10-10 18:03:03 -04:00
---
id: cf1111c1c11feddfaeb7bdef
title: Nest one Array within Another Array
challengeType: 1
2019-08-28 16:26:13 +03:00
videoUrl: https://scrimba.com/c/crZQZf8
forumTopicId: 18247
2018-10-10 18:03:03 -04:00
localeTitle: Гнездо одного массива в другом массиве
---
## Description
2019-08-28 16:26:13 +03:00
<section id='description'>
Вы также можете вложить массивы в другие массивы, например: <code>[["Bulls", 23], ["White Sox", 45]]</code> . Это также называется <dfn>многомерным массивом <dfn>.</dfn></dfn>
</section>
2018-10-10 18:03:03 -04:00
## Instructions
2019-08-28 16:26:13 +03:00
<section id='instructions'>
Создайте вложенный массив с именем <code>myArray</code> .
</section>
2018-10-10 18:03:03 -04:00
## Tests
<section id='tests'>
```yml
tests:
2019-08-28 16:26:13 +03:00
- text: <code>myArray</code> should have at least one array nested within another array.
testString: assert(Array.isArray(myArray) && myArray.some(Array.isArray));
2018-10-10 18:03:03 -04: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>
2019-08-28 16:26:13 +03:00
### After Tests
2018-10-10 18:03:03 -04:00
<div id='js-teardown'>
```js
2019-08-28 16:26:13 +03:00
if(typeof myArray !== "undefined"){(function(){return myArray;})();}
2018-10-10 18:03:03 -04:00
```
</div>
</section>
## Solution
<section id='solution'>
```js
2019-08-28 16:26:13 +03:00
var myArray = [[1,2,3]];
2018-10-10 18:03:03 -04:00
```
2019-08-28 16:26:13 +03:00
2018-10-10 18:03:03 -04:00
</section>