Struggling with this one


#1

Just as well I'm struggling with this one, tried changing code according to suggestions in replying but doesn't seem to be running.

Help is in need!

puts "Text to search through: "
text = gets.chomp
words = text.split(" ")

puts "Word to redact: "
redact = gets.chomp

words.each do |word|

if word != redact
print word + ""
else
print "REDACTED! "
end
end


Redacted 5/6
#2
  1. You missed on your variable words the end of 's' everywhere in code.
  2. They ask to set your word (which is variable named words in your code) equals (==) the word to be redacted (your variable namd redact). But you typed != that is not equals!
  3. Than the ask to print "REDACTED " with a space, not with the exclamation (!) mark.

#3