Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 386 Bytes

remove_exclamation_marks.md

File metadata and controls

19 lines (15 loc) · 386 Bytes

Description

Write function RemoveExclamationMarks which removes all exclamation marks from a given string.

My Solution

def remove_exclamation_marks(s)
  s.delete('!')
end

Better/Alternative solution from Codewars

def remove_exclamation_marks(s)
  s.gsub(/!/, '')
end