Redacted


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-mzrZ6/0/5?curriculum_id=5059f8619189a5000201fbcb#


The code sounds right and the console prints right but i cant go to the next lesson


words = text.split (" ")
words.each do|x|
 if x == "fuck"
     print "REDACTED "
     else
     print x + ""
 end
end


#2

This is the code I used OP

gets the users text

puts "What is the text you want to search?"
text = gets.chomp
text.downcase!

gets the text the user wants to redact

puts "What is the text you want to redact?"
redact = gets.chomp
redact.downcase!

splits the users text into individual words

words = text.split(" ")

iterates through the split words

words.each do |words|
if words == redact
print "REDACTED "
else
print words + " "
end

end

ninja edit: try refreshing the page or reopening the browser


#3

thank you for your help