Home »
MCQs »
Full Stack Development MCQs
push() function in JavaScript is used to ___
26. push() function in JavaScript is used to ____.
- Remove an element from the end of an array
- Insert an element at the end of an array
- Both A and B
- Update an element of an array
Answer: B) Insert an element at the end of an array.
Explanation:
The push() function is used to add an element at the end of an array.