The _______ method is used to remove the last element from an array in JavaScript.

  • pop
  • removeLast
  • deleteLast
  • splice
The correct option is "pop." In JavaScript, the "pop" method is used to remove the last element from an array and returns that element. This method modifies the array it is called on. The other options ("removeLast," "deleteLast," and "splice") either do not exist as array methods in JavaScript or do not specifically remove the last element from an array.
Add your answer
Loading...

Leave a comment

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