freeCodeCamp/curriculum/challenges/spanish/02-javascript-algorithms-an.../basic-javascript/nest-one-array-within-anoth...

62 lines
1.2 KiB
Markdown
Raw Normal View History

2018-10-08 17:34:43 +00:00
---
id: cf1111c1c11feddfaeb7bdef
title: Nest one Array within Another Array
challengeType: 1
2018-10-10 20:20:40 +00:00
videoUrl: ''
localeTitle: Anidar una matriz dentro de otra matriz
2018-10-08 17:34:43 +00:00
---
## Description
2018-10-10 20:20:40 +00:00
<section id="description"> También puede anidar matrices dentro de otras matrices, como esta: <code>[[&quot;Bulls&quot;, 23], [&quot;White Sox&quot;, 45]]</code> . Esto también se llama una <dfn>matriz multidimensional <dfn>.</dfn></dfn> </section>
2018-10-08 17:34:43 +00:00
## Instructions
2018-10-10 20:20:40 +00:00
<section id="instructions"> Crea una matriz anidada llamada <code>myArray</code> . </section>
2018-10-08 17:34:43 +00:00
## Tests
<section id='tests'>
```yml
tests:
- text: <code>myArray</code> debe tener al menos una matriz anidada dentro de otra matriz.
testString: 'assert(Array.isArray(myArray) && myArray.some(Array.isArray), "<code>myArray</code> should have at least one array nested within another array.");'
```
</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
console.info('after the test');
```
</div>
</section>
## Solution
<section id='solution'>
```js
2018-10-10 20:20:40 +00:00
// solution required
2018-10-08 17:34:43 +00:00
```
</section>