JavaScript Reference/Javascript Methods/unshift
Версия от 18:30, 25 мая 2010; (обсуждение)
"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.