javascript slice last 3 characters code example
Example 1: javascript remove last character from string
const text = 'abcdef'
const editedText = text.slice(0, -1) //'abcde'
Example 2: remove last 3 characters from string javascript
str = str.slice(0, -3);
Example 3: javascript remove last character from string
var str = 'string';
str = str.slice(1, 2);