strings section javascript code example
Example 1: cut string from string javascript
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123
Example 2: straforma in string js
var x = new String("Una nuova stringa");
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123
var x = new String("Una nuova stringa");