How to remove all occurrence of character ' in a string in Javascript?

Viewed 6173

My string is like (passenger's name is Suraj and passenger's contact number is XXXXXXX672). How can I remove the occurrences of ' from the string ? I tried using

comments = comments.replace(/'/g, ' '); and comments = comments.replace(/\'/g, ' ');

But they did not work. Please suggest me the needful.

1 Answers
Related