Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Create a Two Dimensional Array

Julien Arseneau
Julien Arseneau
Full Stack JavaScript Techdegree Student 5,200 Points

It tells me that each inner array should have two items in it, but they do.

Why does it say this?

var coordinates = [[2,3],
                   //here i a the three arrays with 4 arrays in them with 2 items//
                  [ [8,3],[4,4],[3,5],[2,8] ],
                  [ [8,6],[4,6],[2,9],[2,2] ],
                  [ [8,2],[4,1],[3,3],[2,4] ]
<!DOCTYPE html>
  <meta charset="utf-8">
  <title>JavaScript Objects</title>
<script src="script.js"></script>

1 Answer

Steven Parker
Steven Parker
216,012 Points

You're working too hard, task 3 only asks you to "Add three more arrays to the coordinates array.". They mean three more like the 1 small one you added in task 2.

What you have now is a three dimensional array, but the challenge is only expecting two.