-10

I get this string

var cadena = "I´m from Mexico"

And need replace or delete ´

var cadena = "Im from Mexico "
rbahena_
  • 47
  • 9

1 Answers1

2

If there is only one

var cadena = "I´m from Mexico".replace('`', '');

To replace all occurrences, use regular expressions:

var cadena = "I´m from Mexico".replace(/`/g, '');

See the JavaScript String.replace method https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/replace

Sid Vishnoi
  • 1,250
  • 1
  • 16
  • 27