* Use dfn tags * remove misused <dfn> tags * Revert "remove misused <dfn> tags" This reverts commit b24968a96810f618d831410ac90a0bc452ebde50. * Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/fill-in-the-blank-with-placeholder-text.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * Make "array" lowercase Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * Fix dfn usage * Address last dfn tags
68 lines
1.1 KiB
Markdown
68 lines
1.1 KiB
Markdown
---
|
|
id: cf1111c1c11feddfaeb7bdef
|
|
title: Nest one Array within Another Array
|
|
challengeType: 1
|
|
videoUrl: 'https://scrimba.com/c/crZQZf8'
|
|
forumTopicId: 18247
|
|
---
|
|
|
|
## Description
|
|
<section id='description'>
|
|
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 arrray<dfn>.
|
|
</section>
|
|
|
|
## Instructions
|
|
<section id='instructions'>
|
|
Create a nested array called <code>myArray</code>.
|
|
</section>
|
|
|
|
## Tests
|
|
<section id='tests'>
|
|
|
|
```yml
|
|
tests:
|
|
- text: <code>myArray</code> should have at least one array nested within another array.
|
|
testString: assert(Array.isArray(myArray) && myArray.some(Array.isArray));
|
|
|
|
```
|
|
|
|
</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
|
|
if(typeof myArray !== "undefined"){(function(){return myArray;})();}
|
|
```
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
## Solution
|
|
<section id='solution'>
|
|
|
|
|
|
```js
|
|
var myArray = [[1,2,3]];
|
|
```
|
|
|
|
</section>
|