Adding and removing items to arrays
By: Daniel Jimenez | Published on: May 11 2021
#Javascript
#Methods
#arrays
Use these 4 Javascript methods to either Add, Remove items to an array. There are many other methods that can be used, but for now I will go over Push, Pop, Shift, and Unshift.

PUSH()
This method will add the items to the end of the array.

POP()
This method will remove the last item in an array

SHIFT()
This method removes the first item of the array, like POP() but Shift removes the first item.

UNSHIFT()
This method will add the items in the beginning of the array, like PUSH() but Unshift will add it to the beginning.
Share:
