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

Ruby

Nitpick concerning the ruby loops challenge

The challenge can be found here: https://teamtreehouse.com/library/ruby-loops/ruby-loops/the-ruby-loop

The instructions say that you should exit the loop if there are MORE than 3 items in the numbers array, but then provides an error saying there were not three items in the array. Changing the inequality to >= fixes this, but it might throw people for a loop.

1 Answer

Garrett Carver
Garrett Carver
14,681 Points

I noticed this too, and I think you are definitely right. The instructions of the challenge should instead say:

"Using the loop construct, add the current value of number to the numbers array. Inside of the loop, add 1 to the number variable. If the numbers array has more than 2 items, use the break keyword to exit the loop."

You should report this bug to help@teamtreehouse.com and they will award you with the Exterminator badge :)

Thanks. Will certainly do that!