Randell Dawson e9212c61d2 fix(curriculum): Remove unnecessary assert message argument from English challenges JavaScript Algorithms and Data Structures - 01 (#36401)
* fix: rm assert msg basic-javascript

* fix: removed more assert msg args

* fix: fixed verbiage

Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com>
2019-07-13 08:07:53 +01:00

1.1 KiB

id, title, challengeType, videoUrl
id title challengeType videoUrl
cf1111c1c11feddfaeb7bdef Nest one Array within Another Array 1 https://scrimba.com/c/crZQZf8

Description

You can also nest arrays within other arrays, like this: [["Bulls", 23], ["White Sox", 45]]. This is also called a Multi-dimensional Array.

Instructions

Create a nested array called myArray.

Tests

tests:
  - text: <code>myArray</code> should have at least one array nested within another array.
    testString: assert(Array.isArray(myArray) && myArray.some(Array.isArray));

Challenge Seed

// Example
var ourArray = [["the universe", 42], ["everything", 101010]];

// Only change code below this line.
var myArray = [];

After Test

if(typeof myArray !== "undefined"){(function(){return myArray;})();}

Solution

var myArray = [[1,2,3]];