const array = [1, 2, 3, 4] //remove the first element of the array array.shift() //add an element to the beginning of the array array.unshift() //remove the last element in an array array.pop() //add an element to the end of the array array.push()
const array = [1, 2, 3, 4] //remove the first element of the array array.shift() //add an element to the beginning of the array array.unshift() //remove the last element in an array array.pop() //add an element to the end of the array array.push()