-2

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

Harshit Gupta
  • 719
  • 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
  • 85,780
  • 21
  • 159
  • 179
1

Did you try?

yourString = yourString.replace(/"/g, "");
Matt
  • 4,462
  • 5
  • 25
  • 35