-2

I want to remove all occurence of " from the String in javascript

Harshit Gupta
  • 659
  • 1
  • 9
  • 26
  • Please check this: http://stackoverflow.com/questions/1144783/replacing-all-occurrences-of-a-string-in-javascript – DDphp Jul 02 '15 at 12:28

2 Answers2

1

You can use replace with regex. This will remove all the " in str string.

str = str.replace(/"/g, '');

g(global) flag will make the regex to replace all occurrences of " in str.

Tushar
  • 82,599
  • 19
  • 151
  • 169
1

Did you try?

yourString = yourString.replace(/"/g, "");
Matt
  • 4,202
  • 5
  • 23
  • 33