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

Patrick Witbrod
Patrick Witbrod
3,882 Points

Why does the code challenge pass task one and then immediatly say I'm not passing when I start task two?

My code is fine when I finish task one.

Then, when I check my work for task two it says task one is not passing anymore. This happens even when I don't add any code for task two.

Am I doing this somehow or is this code challenge broken?

arrays.js
var mixture = ["hi", "bye", "hello", 1, 2, false];
var guides = new array(42);

Task one is to make an array with 3 strings, 2 numbers, and a bool. Task two is to "Set the 'guides' that has placeholders for 42 elements but has no values stored in it."

2 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Patrick;

There is a syntax error in your second line of code that is kicking it back to Task 1. Array needs to be capitalized.

Ken

Patrick Witbrod
Patrick Witbrod
3,882 Points

I fixed that but also kicked it back to task one without adding any code for task two. (Passing test one and immediately clicking check code on task two would make me go back to task one and re-submit something I had never had to do before.

That being said I opened it in a new tab changed "array" to "Array" and it worked in the new tab without making me redo task one if I hadn't added any code.

I was in the middle of typing this when I got your notification.

Ken Alger
Ken Alger
Treehouse Teacher

Patrick;

I would guess that having it check Task 2 without anything defined for var guides causes the challenge checker to hiccup a bit when it is looking to evaluate the array guides for which it is looking.

Happy coding,

Ken