I used the
push command and printed the array before using the
pop command, but it is not applied and is gone
That's because the content of your array is evaluated only after you click the arrow to the left of the array in your console. So what you see in the console in both cases is the result after both
pop, so they appear empty.
If you hover over the little
i symbol to the right of
Array, it tells you exactly that ("Value below was evaluated just now").