DEV Community

Discussion on: Daily Challenge #46 - ???

Collapse
 
mellen profile image
Matt Ellen • Edited

(javascript)

function noMoreQM(input)
{
  return input.replace(/\?/g, '');
}

Uses a simple regular expressions with the global (g) modifier to find all the ? (this needs to be escaped in a regular expression, so \?) and replace them with the empty string ''.