Hi, what is wrong with my code:


#1

I don't understand what is wrong...

https://www.codecademy.com/courses/ruby-beginner-en-Qn7Qw/1/4?curriculum_id=5059f8619189a5000201fbcb#

error message:
"Oops, try again. It looks like HTML isn't a symbol."


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

strings.each do |s| 
    "s".to_sym
     symbols.push(s)
end

print symbols


#2

here's the problem this two lines should be one,

like,

symbols.push(s.to_sym)

meaning all the strings in the array are pushed into the empty array symbols and are all turned into symbols.


#3

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