JavaScript Reference/Javascript Methods/unshift
"unshift()" Example
<html>
<body>
<button onclick="var myA = new Array(10,11,12); myA.unshift(1); alert(myA);">
unshift array
</button>
</body>
</html>
"unshift()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Array |
+----------------+--------------------------------------------------------------+
"unshift()" Syntax, Parameters and Note
Note:
Adds elements to Array"s start and returns the enlarged array.
Syntax:
arrayName.unshift(paramN, . . . ,paramN)
Parameters:
paramN Required; the elements to be added.