Why doesnt my method works?



Why doesn't my method work ? Error as follows undefined method `to_sym!' for "HTML":String

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

# Add your code below!
symbols = []

strings.each do |string|               


That's not quite the right method name (and it would be very confusing if a string suddenly turned into a symbol, which is probably why that function doesn't exist and/or that it isn't even possible)

Instead one would want to create a symbol from what's in the string. What's the method name for that? (slightly different)


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