Answers for "how to remove the last letter of a string by modifying the stringin javascript"

103

js remove last character from string

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

javascript remove last character from string

var str= "Hello TecAdmin!";
var newStr = str.substring(0, str.length - 1);
Posted by: Guest on June-16-2021

Code answers related to "how to remove the last letter of a string by modifying the stringin javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language