remove last character from string javascript
snippet in javascript

js remove last character from string

user5902

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

remove last character from string javascript

user4863

const text = 'abcdef'
const editedText = text.slice(0, -1) //'abcde'

remove last character from string javascript

user6060

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

remove last character from string javascript

user5674

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

remove last character from string javascript

user4247

console.log(parseFloat('12345.00').toFixed(1));