ArrayPrototype.sort(Object, Object) Method

Definition

Sorts the elements of the specified array by using the specified function to compare the elements.

This API supports the product infrastructure and is not intended to be used directly from your code.

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

Parameters

thisob
Object

The object that this method is acting upon.

function
Object

The function to use to compare elements.

Returns

thisob.

Attributes

Applies to

See also