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.
Alphonse Cuccurullo2,513 Points
Having trouble converting to symbols.
Add your code below!
symbols = Array.new strings.to_sym.each do |i| if i !=1 symbols.push(i) end end
This pops up "It looks like you didn't add each symbolized string to the symbols array."
The goal is to iterate over the string and convert them to symbols and add them to a seperate array.
Tim Knight28,888 Points
What about something like this:
This converts each item in the string array to a symbol and then adds it to a symbols array. I'm not sure what your intention was with
if != 1 but this at least addresses the array of symbols.
You can test it with: