How to remove the last character in a string with javascript
1 min read

How to remove the last character in a string with javascript

How to remove the last character in a string with javascript

Code snippet to remove the last character of a string in javascript.

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

// 12345.0