remove last 3 letters from string javascript code example
Example 1: js remove last character from string
let str = "Hello Worlds";
str = str.slice(0, -1);
Example 2: javascript how to remove the last character of the string
var string = "RandomString";
var slicedString = string.slice(0, -1);