remove last character from string js
snippet in javascript

js remove last character from string

user6040

let str = "Hello Worlds";
str = str.slice(0, -1);

remove last character from string js

user3032

var str = "Your string"
str = str.slice(0, -1); 
console.log(str)
//returns "Your strin"

how to remove lasr char from string in javascript

user5566

str=str.slice(0, -1);

remove last character from string js

user7889

let str = "12345.00";
str = str.substring(0, str.length - 1);
console.log(str);