javascript get the first item out of an array code example
Example: javascript take first element of array
const array = [1,2,3,4,5];
const firstElement = array.shift();
// array -> [2,3,4,5]
// firstElement -> 1
const array = [1,2,3,4,5];
const firstElement = array.shift();
// array -> [2,3,4,5]
// firstElement -> 1