JavaScript Reference/Javascript Methods/shift
"shift()" Example
<html>
<body>
<button onclick="var myA = new Array(10,11,12); myA.shift(); alert(myA);">SHIFT</button>
</body>
</html>
"shift()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Array |
+----------------+--------------------------------------------------------------+
"shift()" Syntax, Parameters and Note
Note:
Removes the first element in an array.
Returns the element being removed.
Syntax:
arrayName.shift()