Ruby Ruby Loops Ruby Loops The Ruby Loop

Brian Patterson
Brian Patterson
19,585 Points

Not sure why this isn't working?

'numbers = []

number = 0 loop do numbers += (23,44,54) end' Not sure why this isn't working

loop.rb
numbers = []

number = 0
loop do 
  numbers += (23,44,54)
  break
  end

# write your loop here

2 Answers

Alistair Mackay
Alistair Mackay
7,812 Points

I got stuck with this one as well, this post showed me where I was going wrong -

https://teamtreehouse.com/community/loops-14

Hope this helps.

-PC

Jacob Bergdahl
Jacob Bergdahl
29,118 Points

There are a few things wrong with the code. Rather than giving you the answer, I would really recommend you to watch the video before the challenge again to make sure that you fully understand what's going on.