EN
JavaScript - remove first character from string
8 points
In JavaScript, it is possible to remove the first character from the string in the following ways.
xxxxxxxxxx
1
var text = "abc";
2
var substring = text.slice(1);
3
4
console.log(substring); // bc
xxxxxxxxxx
1
var text = "abc";
2
var substring = text.substring(1);
3
4
console.log(substring); // bc
xxxxxxxxxx
1
var text = "abc";
2
var substring = text.replace("abc", "bc");
3
4
console.log(substring); // bc