Answers for "short string javascript"

4

How to make string shorter javascript

const string = "Name".slice(0, 250).concat('...');
const string2 = "Name".substring(0, 250).concat('...');
Posted by: Guest on February-22-2020
0

shorten string js

let str = "Hello world!";
str.slice(0, 5)   // Returns "Hello"
Posted by: Guest on July-29-2021
0

short string javascript

short = long.replace(/(.{7})..+/, "$1…");
Posted by: Guest on October-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language