If you prefer using substring method:
let str = "12345.00";
let trimmed = str.substring(0, str.length - 1);
Same result, but substring method might feel more explicit if you’re newer to negative indexing.
If you prefer using substring method:
let str = "12345.00";
let trimmed = str.substring(0, str.length - 1);
Same result, but substring method might feel more explicit if you’re newer to negative indexing.