+ 1
What do make this code?
puts "Enter some text: " text = gets.chomp puts "Enter words to redact: " redact = gets.chomp words = text.split(" ") words.each { |word| if word == redact print "REDACTED " else print word + " " end }
1 Answer
+ 1
Run it in Code Playground and you will see