Not sure why this doesn't work


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 + " "
print "REDACTED"

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

Remove this line:

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