I am not sure what is wrong in the code. Can someone please help? I have tried numerous times to reload the page but i keep getting the same error of this in the console "undefined local variable or method `word' for #" and this above the button "Oops, try again. Make sure to print each word from the user's text to the console unless that word is the word to be redacted; if it is, print REDACTED (all caps!)."
puts "please write some text" text = gets.chomp puts "please write somthing to redact" redact = gets.chomp words = text.split(" ") words.each do |words| if word == redact print "REDACTED " else print word + " " end end