Please can any开发者_StackOverflow中文版one translate this python code into javascript.
#
def strip_punctuation(s):
#
for c in ',.":;!%$':
#
while s.find(c) is not -1:
#
s.replace(c, '')
function strip_punctuation(s) {
return s.replace(/[,.":;!%$]/g, "");
}
精彩评论