function shift characters javascript code example
Example 1: remove first 3 characters from string javascript
var string = "abcd";
console.log(string.substring(3)); //"d"
Example 2: javascript shift
let array = ["A", "B", "C"];
//Removes the first element of the array
array.shift();
//===========================
console.log(array);
//output =>
//["B", "C"]