how to remove the last character from a string in javascript
var str = "Hello TecAdmin!";
var newStr = str.slice(0, -1);
let str = "12345.00";
str = str.slice(0, -1);
console.log(str);let str = "12345.00";
str = str.substring(0, str.length - 1);
console.log(str);
Also in JavaScript:
- typeface in gatsby
- geolocation speed
- JS get viewport width
- global scope js
- iframe content zoom in and zoom out jquery
- play sound javascript
- calculate string value in javascript
- data in table when i click the table link in open table in another jquery
- Object destructuring
- merge objects javascript
- call a function whenever routerlink is clicke angular
- js increment safety value html
- jquery droppable allow what can be dropped
- javascript test if it is an array
- onchange value in hidden input
- javascript call function every second
- how to make an object stop at the end of your canvas p5js
- c# convert object to json
- material ui grid react
- middleware
- username validation js
- jquery get return jquery object
- how javascript works
- chrome extension get current tab from popup