Exercise 5: Remove Characters from a String

Practice removing certain characters from a string.

Problem statement

Skim through the string documentation in the Ruby documentation, and look for a method that removes characters from a string. Using that method, try to delete the input characters from the input string in the exercise below.

Example

input_string = "Ruby is fun"
input_characters = "u"
result = "Rby is fn"

Try it yourself

Press + to interact
def remove_chars(input_string, input_characters)
result = ""
# Start your code here
return result
end