pop() removes the last item from an array and stores it in a variable. So the initial array, if called after the pop() action will exclude the removed item.
.pop() removes the last element from an array and returns that element.
Look at the name of the variables:
myArray should only contain [["John", 23]] .
removedFromMyArray should only contain ["cat", 2] .
they are correct. myArray starts as [["John", 23], ["cat", 2]], you remove the last element with pop, and then it remains as [["John", 23]]
meanwhile the removed element is stored in removedFromMyArray