Question · JavaScript and TypeScript course · Module 5: Advanced JavaScript

Array Methods in Practice - push and pop

What does the push() method do in a JavaScript array?

Answer options

  • Removes the last element from the array
  • Removes the first element from the array
  • Adds an element to the beginning of the array
  • Adds one or more elements to the end of the array

You can check the correct answer by solving this task in the CodeWorlds game.