With JavaScript arrays, you can store multiple values under one variable. One way to modify that information is by changing the variable it is stored on's value, but that will change the entire array. What if you just wanted to add/remove information at the start or at the end of an array? With JavaScript array methods, you can!
pop()
Removes an element at the end of an array.
push()
Adds new element(s) to the end of an array.
shift()
Removes an element at the start of an array.
unshift()
Adds new element(s) to the start of an array.
TL;DR: pop() removes an element at the end of an array. push() adds new element(s) to the end of an array. shift() removes an element at the start of an array. unshift() adds new element(s) to the start of an array.
Hey! I want you to know that feedback is appreciated! Yes, that includes your trash talk being highly critical about even the tiniest thing as long as your criticisms are valid. So if you can, please comment what you think about this post.
You got the job