short string javascript code example
Example 1: How to make string shorter javascript
const string = "Name".slice(0, 250).concat('...');
const string2 = "Name".substring(0, 250).concat('...');
Example 2: short string javascript
short = long.replace(/(.{7})..+/, "$1…");