JavaScript Eliminar el último carácter de la cadena
var str = 'mystring';
// the character 'g' will be removed
str = str.slice(0, -1);
Coding Random Things
var str = 'mystring';
// the character 'g' will be removed
str = str.slice(0, -1);
let str = "Hello Worlds";
str = str.slice(0, -1);
str = "hello I'm McDown...";
newStr = str.substring(0, str.length - 3); // Returns "hello I'm McDown"
let str = "Hello World!";
str =str.slice(0, -1);
var string = "RandomString";
var slicedString = string.slice(0, -1);
const base = 'javascript, remove last char!'
const s = base.slice(0, -1);
console.log(s); // javascript, remove last char