const base = 'javascript, remove last char!' const s = base.slice(0, -1); console.log(s); // javascript, remove last char