Help with part 9 of Hashes and Symbols


#1

Hello everyone, I'm currently stuck on exercise 9/15,' converting between symbols and strings'.
I have tried multiple things and I cannot figure out what is wrong. I have posted my code below.
When I put it, it prints [:CSS, :JavaScript]nil but It gives me this error:
"Oops, try again. It looks like you didn't add each symbolized string to the symbols array."

Can someone hint me at what's wrong?
Thanks in advance for your trouble.

symbols = []

strings.each do |x|
    if x.include? "S"
        symbols.push(x.to_sym)
    end
end

print symbols

#2

Okay, apparently I had to convert EVERY string to a symbol. It wasn't clear, sorry, this can be closed.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.