bagaimana menghapus huruf terakhir js

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