1var str = 'mystring';
2
3// the character 'g' will be removed
4str = str.slice(0, -1);
1str = "hello I'm McDown...";
2newStr = str.substring(0, str.length - 3); // Returns "hello I'm McDown"
1var str = 'mystring';
2
3// the character 'g' will be removed
4str = str.slice(0, -1);
5
6let str = "12345.00";
7str = str.slice(0, -1);
8console.log(str);