javascript delete first character in string
snippet in javascript

delete first character javascript

user3607

let str = 'Hello';
 
str = str.slice(1);
console.log(str);
 
/*
    Output: ello
*/

javascript delete first character in string

user3473

var oldStr ="Hello";
var newStr = oldStr.substring(1); //remove first character "ello"