Bonjour, la fin de l’exercice n’est pas si simple : Utilisez .each pour itérer sur le tableau strings. 3 Pour chaque s dans string, utilisez to_sym pour convertir s en symbole et utilisez push pour ajouter ce symbole au tableau symboles.
je ne saisi pas bien comment convertir chaque “s” de string en symbole? Help please
Début de code
Hello, I can’t find any solution for this exercise can you help? Ruby => Hashes and Symbols 9/15
strings = [“HTML”, “CSS”, “JavaScript”, “Python”, “Ruby”]
symboles =
strings.each do |string|
"string".to_sym
symboles.push(string)
end
end
print symboles
I don’t understand how I can only show the “s” of string
This is correct. I misunderstood the question until I read this reply. The question isn’t asking you to find every “s” in the strings array, it is telling you to use s as the placeholder