Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
Array.prototype.unshift() has similar behavior to push(), but applied to the start of an array.
arr.concat([element0, element1, /* ... ,*/ elementN])
Array.prototype.unshift() has similar behavior to push(), but applied to the start of an array.
This example uses spread syntax to push all elements from a second array into the first one.
This page was last modified on Jul 12, 2026 by MDN contributors.