How to remove text from a string?

var ret = "data-123".replace('data-','');
console.log(ret);   //prints: 123

Leave a Comment