return string without last two characters javascript code example
Example: javscript remove last character
const text = 'abcdef'
const editedText = text.slice(0, -1) //'abcde'
const text = 'abcdef'
const editedText = text.slice(0, -1) //'abcde'