delete from string last / js code example Example: javascript remove last character from string let str = 'mystring'; str = str.slice(0, -1);