Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Removes the first element from an array and returns it.
Syntax
arrayObj.shift( )
Remarks
The required arrayObj reference is an Array object.
The shift method removes the first element from an array and returns it.
The following example illustrates the use of the shift method.
var ar = new Array(10, 11, 12);
while (ar.length > 0)
{
var i = ar.shift();
document.write (i.toString() + " ");
}
// Output: 10 11 12
Requirements
Applies To: Array Object (Windows Scripting - JScript)
Change History
Date |
History |
Reason |
|---|---|---|
March 2009 |
Added example. |
Information enhancement. |