SyntaxFix
Write A Post
Hire A Developer
Questions
First, you don't declare the type in Ruby, so you don't need the first string.
string
To replace a word in string, you do: sentence.gsub(/match/, "replacement").
sentence.gsub(/match/, "replacement")