Push, Pop, Pez & Understanding JavaScript Functions
I had a bit of difficulty remembering the exact way push and pop functions in JavaScript work until I thought of the PEZ dispenser. When you have an array that you create like this: var bob = [1,47] ; and you do this: bob.push(9,12) now your new array is [1,47,9,12] In other words, push…