I have this string: "gss_save,cls,x_value". I want to convert it to "x_value". I tried this:
//var cls is "gss_save,cls,x_value";
var fnl = cls.replace('gss_save,cls,','');
console.log(fnl);
As suggested by other answers in this site, but I get: Uncaught TypeError: undefined is not a function in line var fnl = cls.replace('gss_save,cls,','');. Expecting to get "x_value".