Not sure why this doesn't work


#1

hi is anyone able to answer my same query> not sure why this doesn't work?

puts "text:"
text = gets.chomp
puts "redact:"
redact = gets.chomp

words = text.split (" ")
words.each do |words|
print words
if word != redact
print word + " "
else
print "REDACTED"
end
end


Control Flow Know How (Redacted) my code works, but still fails
#2

@bhasellmccosh
Remove this line:

Also, don't forget to add an s after your word to spell correctly words not word! :slightly_smiling: