Answers for "js cutt off the last 2 character of a string"

9

javascript remove last characters from string

const text = 'abcdef'
const editedText = text.slice(0, -1) //'abcde'
Posted by: Guest on August-27-2020
1

java script remove last character from string

let str = "Hello World!";
str =str.slice(0, -1);
Posted by: Guest on April-09-2021

Code answers related to "js cutt off the last 2 character of a string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language