How to remove the first character of a string in Javascript?

To remove the first character of a string in Javascript, use the substring method: .substring(1).

Example:


let str = "uhded";

str = str.substring(1);

// str will now be "hded"

The way this works is that the argument of 1 in the substring method means to start the extraction at index 1. Hence removing the first character.