What will be the return value of ["apple", "banana", "cherry"].pop();?

  • "apple"
  • "banana"
  • "cherry"
  • undefined
The return value will be "cherry". The pop() method removes the last element from an array and returns that element. In this case, it removes "cherry" from the end of the array and returns it.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *