ArrayPrototype.shift(Object) 方法

定义

从指定数组中移除第一个元素,并返回该元素。Removes the first element from the specified array and returns it. 将剩余元素位移到前面的位置。Shifts the remaining elements to the previous positions.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static System::Object ^ shift(System::Object ^ thisob);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Array_shift)]
public static object shift (object thisob);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Array_shift)>]
static member shift : obj -> obj
Public Shared Function shift (thisob As Object) As Object

参数

thisob
Object

此方法所作用于的对象。The object that this method is acting upon.

返回

Object

thisob 的第一个元素。The first element of thisob.

属性

适用于

另请参阅