how to remove text from the end of a STRING js code example Example: how to remove lasr char from string in javascript str=str.slice(0, -1);