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

1.2 KiB

id title challengeType videoUrl localeTitle
cf1111c1c11feddfaeb7bdef Nest one Array within Another Array 1 Aninhar uma matriz dentro de outra matriz

Description

Você também pode aninhar matrizes dentro de outras matrizes, como este: [["Bulls", 23], ["White Sox", 45]] . Isso também é chamado de matriz multidimensional .

Instructions

Crie uma matriz aninhada chamada myArray .

Tests

tests:
  - text: <code>myArray</code> deve ter pelo menos um array aninhado em outro array.
    testString: 'assert(Array.isArray(myArray) && myArray.some(Array.isArray), "<code>myArray</code> should have at least one array nested within another array.");'

Challenge Seed

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

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

After Test

console.info('after the test');

Solution

// solution required