if last character letter then strip javscript code example
Example 1: remove first and last character from string javascript
const removeChar = (str) => str.slice(1, -1);
Example 2: how to remove the last character from a string in javascript
var str = "Hello TecAdmin!";
var newStr = str.slice(0, -1);