Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
The pop() method removes the last element from an array and returns that value to the caller. If you call pop() on an empty array, it returns undefined.
Calling pop() on non-array objects
The pop() method reads the length property of this. If the normalized length is 0, length is set to 0 again (whereas it may be negative or undefined before). Otherwise, the property at length - 1 is returned and deleted.
Calling pop() on non-array objects
The pop() method reads the length property of this. If the normalized length is 0, length is set to 0 again (whereas it may be negative or undefined before). Otherwise, the property at length - 1 is returned and deleted.
This page was last modified on Jul 10, 2025 by MDN contributors.