Answers for "remove last checkter from string java script"

75

js remove last character from string

let str = "Hello Worlds";
str = str.slice(0, -1);
Posted by: Guest on January-16-2020
-1

remove last word from string javascript

var myString = "I want to remove the last word";
var mySplitResult = myString.split(" ");
var lastWord =  mySplitResult[mySplitResult.length-1]
Posted by: Guest on January-04-2021

Code answers related to "remove last checkter from string java script"

Code answers related to "Javascript"

Browse Popular Code Answers by Language