Como quitar el ultimo cutmo de un cuerda

const text = 'abcdef'
const editedText = text.slice(0, -1) //'abcde'
Your Black Hole