freeCodeCamp Challenge Guide: Nest one Array within Another Array

Nest one Array within Another Array


Hints

Hint 1

Arrays are one-dimensional; that means they store only one row of data. But you can make an array multi-dimensional by putting arrays inside arrays! Like so:

var arr = [["Two-dimensional", 2], ["Two rows", 12]];

The above array has two dimensions.

1 Like

How can I correctly submit this answer (see code below)? 3:23 and 5:57 should be a number. I tried escaping the colon like this: 3\:23 and it doesn’t seem to register correctly. Any thoughts?

var myArray = [["Marathon", 3:23], ["Triathlon", 5:57]];

1 Like