How to remove // and end
//]]>
with javascript from string?
var title = \"
You can use the String.prototype.replace
method, like:
title = title.replace("", "");
This will replace each target substring with nothing. Note that this will only replace the first occurrence of each, and would require a regular expression if you want to remove all matches.
Reference: