• 0

Delete a last character from a string in javascript

var a = "wxyz";

a = a.substr(0, a.length - 1);

console.log(a); // wxy