I don't understand "If you were to put a new line between the two rows, you could log a 2D object—a square—to the console"


#1


https://www.codecademy.com/courses/javascript-beginner-en-9Sgpi/1/2?curriculum_id=506324b3a7dffd00020bf661#


newArray=[[1,1,1],[1,1,1],[1,1,1]];


#2

So you have example of var newArray = [[1,1],[1,1]];.
They are placed in same line. If you were to put a new-line separator then your arrays would look like
[1,1] <-- this is 1. line
[1,1] <-- this is 2. line

And square is something they make look like when they are in this formation.

[1,1]
[1,1]

If you don't focus on numbers you can see that shape is square. 2 numbers wide and 2 numbers high.
It's just a visual expression.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.