Redacted exercise 4


#1

Here's my code, and the error it gives is "Oops, try again. It looks like you didn't print each word from the user's text to the console.

puts "Type man!!"
text = gets.chomp

puts "Take out WHAT?!!"
redact = gets.chomp

words = text.split (" ")

words.each do |word|

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


#2

Don't forget the space "REDACTED " <---AFTER the word BEFORE last quotation marks

work for u?