Answers for "how to cut the word last letter js"

3

how to remove last three letters of word in js

str = str.slice(0, -3);
Posted by: Guest on April-06-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 "how to cut the word last letter js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language