Skip to content

Latest commit

 

History

History

removeAnExclamationMarkFromTheEndOfString

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Remove an exclamation mark from the end of string

8 kyu link to kata
my solution

Remove an exclamation mark from the end of a string. For a beginner kata, you can assume that the input data is always a string, no need to verify it.

Examples

remove("Hi!") == "Hi"
remove("Hi!!!") == "Hi!!"
remove("!Hi") == "!Hi"
remove("!Hi!") == "!Hi"
remove("Hi! Hi!") == "Hi! Hi"
remove("Hi") == "Hi"