how to remove first character from a string code example

Example 1: javascript remove first character from string

let str = " hello";
str = str.substring(1);

Example 2: remove first character from string

String str = "Hello World";
String str2 = str.substring(1,str.length());

Example 3: javascript remove first character from string

let str = 'ass';

str = str.split(''); // (3) ["a", "s", "s"]
str.shift(); // (2) ["s", "s"]
str = str.join(''); // "ss"

Example 4: how to remove first letter of a string

s = "hello"
print s[1:]