How do I convert this Python desorption punctuation function to JavaScript?

Please anyone can translate this python code to javascript.

#
def strip_punctuation(s):
#
    for c in ',.":;!%$':
#
        while s.find(c) is not -1:
#
            s.replace(c, '')

      

+2


a source to share


1 answer


function strip_punctuation(s) {
    return s.replace(/[,.":;!%$]/g, "");
}

      



+12


a source







All Articles