Skip to content

Latest commit

 

History

History

exclamation-marks-series-number-6-remove-n-exclamation-marks-in-the-sentence-from-left-to-right

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Remove n exclamation marks in the sentence from left to right. n is positive integer.

Examples

remove("Hi!",1) === "Hi"
remove("Hi!",100) === "Hi"
remove("Hi!!!",1) === "Hi!!"
remove("Hi!!!",100) === "Hi"
remove("!Hi",1) === "Hi"
remove("!Hi!",1) === "Hi!"
remove("!Hi!",100) === "Hi"
remove("!!!Hi !!hi!!! !hi",1) === "!!Hi !!hi!!! !hi"
remove("!!!Hi !!hi!!! !hi",3) === "Hi !!hi!!! !hi"
remove("!!!Hi !!hi!!! !hi",5) === "Hi hi!!! !hi"
remove("!!!Hi !!hi!!! !hi",100) === "Hi hi hi"

Note

Please don't post issue about difficulty or duplicate.