remove a first then b javascript code example
Example 1: javascript remove first character from string
let str = " hello";
str = str.substring(1);
Example 2: javascript how to remove first element of array
var colors = ["red", "blue", "green"]
var firstColor = colors.shift()
console.log(firstColor) // red
console.log(colors) // blue green