how to remove number from starting index in string javascript code example
Example 1: javascript remove first character from string
let str = " hello";
str = str.substring(1);
Example 2: trim first character in javascript
let str = 'Hello';
str = str.slice(1);
console.log(str);
/*
Output: ello
*/
Example 3: remove character at index from string javascript
// removing char at index 3
var str = "Hello World";
str = str.slice(0, 3) + str.slice(4);
console.log(str) // Helo World