string js remove code example
Example 1: remove substring from string javascript
var ret = "data-123".replace('data-','');
Example 2: js remove string from string
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123
var ret = "data-123".replace('data-','');
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123