Converting Between Symbols and Strings (Lesson 9) : Hey don't ban me from this. I just started learning to code and its some bullshit to have people freely cut you off from using this site like they own it. Act the way you'd act in front of people and show some respect'

Anyways I'm learning bout gsub and symbols atm and I got asked the question to replace the s's in an array with to_sym to make them symbols and this is how its asked
https://i.stack.imgur.com/9K2ES.png


We have an array of strings we'd like to later use as hash keys, but we'd rather they be symbols. 

  

 1. Create a new variable, symbols, and store an empty array in it
    
 2. For each s in strings, use .to_sym to convert s to a symbol and
    use .push to add that new    symbol to symbols. 
    
 3. Print the symbols array.



I ended up writing it like this '

strings.each do |string|

 if strings.include? "s"

 strings.gsub! (/s/, .to_sym)
 
end
 
symbols.push (string)
  
 end

print symbols





_______________________________________________________________________



The code didn't even end up working so I'm trying to get help in that regards. For reference here was the answer that they wanted 
______________________________________________________________________



strings.each do |s| 

 symbols.push(s.to_sym)

end 

print symbols

