ho to splice a string in javascript code example
Example 1: string splice
newStr = str.split(''); // or newStr = [...str];
newStr.splice(2,5);
newStr = newStr.join('');
Example 2: short string javascript
short = long.replace(/(.{7})..+/, "$1…");