The shift() method is to move the first element of an array out
var arr = [1,2,3,4,5]; var b = arr.shift(); console.log(b) 1 take the first element console.log(arr) [2, 3, 4, 5] Array after removing the first element
The shift() method is to move the first element of an array out
var arr = [1,2,3,4,5]; var b = arr.shift(); console.log(b) 1 take the first element console.log(arr) [2, 3, 4, 5] Array after removing the first element