Another way to change the data in an array is with the
.pop() is used to "pop" a value off of the end of an array. We can store this "popped off" value by assigning it to a variable.
Any type of entry can be "popped" off of an array - numbers, strings, even nested arrays.
For example, for the code
var oneDown = [1, 4, 6].pop();
oneDown now holds the value
6 and the array becomes
.pop() function to remove the last item from
myArray, assigning the "popped off" value to