How do arrays make squares?!


#1


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


My code does not behave incorrectly, however, I am seriously confused. What does it mean when this excercise says you can log a square to the console?! Like an actual shape or like the array in the shape of a square so that it looks kind of like that?! I am so confused.


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


#2

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

It looks like a matrix 3 x 3 like that:
1 1 1
2 2 2
3 3 3


#3

So, that's all they mean when they say you can log a square?


#4


#5

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