remove the last first from a string javascript code example Example: how to remove lasr char from string in javascript str=str.slice(0, -1);