javascript remove the last character of a string
var str = "Your string"
str = str.slice(0, -1);
console.log(str)
//returns "Your strin"let str = "12345.00";
str = str.substring(0, str.length - 1);
str=str.slice(0, -1);"somestring0".slice(0, -1)
// "somestring"let str = "12345.00";
str = str.substring(0, str.length - 1);
console.log(str);let str = "12345.00";
str = str.substring(0, str.length - 1);
console.log(str);
Also in JavaScript:
- sum array without loop javascript
- how to make a github api using react
- v-for vuejs
- the word need blinck for seconds later it need to move for next place using javascript
- Prevent Multiple Form Submissions With JQuery
- read xlsx file in angular 5
- trigger play video jquery
- javascript are arrays equal
- ajax status code
- js script
- break loop after time javascript
- element.value javascript
- Js Swiper
- jquery on form submit call function
- get first element by class name jquery
- javascript remove item onclick
- javascript resize event
- javascript var in quotes
- javascript indexOf object value in array
- how to hash password in node js
- && in react jsx
- math.floor
- disregard empty field in array
- jstl tag