DEV Community

Discussion on: Daily Challenge #46 - ???

Collapse
 
georgecoldham profile image
George • Edited

Javascript:

const removeQuestionMark = string => string.replace(/\?/g, '')

Called as:

removeQuestionMark('Will this work???') // yes

Important to note, this will also remove the first escape characters (\) and output newlines in template literals as \n