Slice Eliminar El Ultimo Caracter

const str = "DelftStacks";
const str2 = str.substring(0, str.length - 1);
console.log(str2);
Jose Campos