Remove First Indexletter In A String Code Example

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