Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Foundations Arrays Creating Arrays

Problem with array

I have this on my code:

var mixture = ["Hola", "Otro", "Luis", 1, 2, true]; var guides = new array(42);

But i have a problem because the console say me: " It looks like Task 1 is no longer passing." I don't understand why.

Anyone knows why show me that error?

Aaron Graham
Aaron Graham
18,033 Points

try:

var mixture = ["Hola", "Otro", "Luis", 1, 2, true];
var guides = new Array(42);

You were probably getting a reference error from using array() instead of Array(). Case sensitivity...

Aaron Graham

You should post this as an answer.

Aaron Graham
Aaron Graham
18,033 Points

Wow. Thanks Jason Anello. It's clearly past my bedtime.

2 Answers

Aaron Graham
Aaron Graham
18,033 Points

And now, in the form of an actual answer...

try:

var mixture = ["Hola", "Otro", "Luis", 1, 2, true];
var guides = new Array(42);

You were probably getting a reference error from using array() instead of Array(). Case sensitivity...

Yes Aaron you are right! The case sensitive was the problem! Thanks :)

Ben Lee
Ben Lee
9,791 Points

I have had the same problem. Make sure you don't combine the next challenge with the previous one. I'm not quite sure what your challenge is, but make sure you start fresh with every challenge, unless told otherwise. Good luck!