js remove last character from string
snippet in javascript

how to remove last character from string in javascript

Omkar Jawalkar

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

js remove last character from string

user6070

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

javascript remove last character from string

user6565

var str = "Hello";
var newString = str.substring(0, str.length - 1); //newString = Hell

remove last character from string js

user4445

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

how to remove lasr char from string in javascript

user3852

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

js remove last character from string

user9963

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

js remove last character from string

user2266

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