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!

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


Alphonse Cuccurullo
Alphonse Cuccurullo
2,513 Points

Help me please?

strings = ["HTML", "CSS", "JavaScript", "Python", "Ruby"]

symbols = []

strings.each {|s| s.to_sym.push(symbols)}

The goal is to convert the strings in the string array into symbols and add them to the symbols array. Everytime i try this its tells me that the html symbol isnt factoring. Here is the link.


1 Answer

Clayton Perszyk
Clayton Perszyk
Treehouse Moderator 48,605 Points

HI Alphonse,

You want to call push on the symbols array and pass it the string converted to a symbol; the way you have it, push is being called on the string, converted to a symbol.

strings.each {|s| symbols.push(s.to_sym)}