$ ./guess_the_languageRegex
Regex · medium · #51

What does this expression return?

'cost'.replace(/cost/, '$$5')
  1. '$5'
  2. '$$5'
  3. 'cost5'
  4. '5'
In a replacement string $$ is the escape for a single literal $.
Play Regex ▸