Thank you for your answer. Appreciate every input. I want to wish you a happy new year.
Tell me, what would be the practical use of " pop" ?
The array class has many different methods. Another of which is push() which adds values to the end of the array. Using push and pop it is possible to easily create a last-in-first-out type of system. For example supposed you wanted to make a navigation similar to a browser back button.
Each time you visit a new page/location/etc. you push that location onto your array of locations. Then when you want to back up you pop off the last one.
It is similar to a last-in-first-out kind of system like a desktop inbox might have.
There are other methods for the array class as well. Like unshift(). Check the documentation. Arrays are really quite useful. Many of their operations are "expensive" in terms of processing time. But for most basic stuff they work just great.