toArray :: Enumerable

sortBy(iterator) -> Array

 

Provides a custom-sorted view of the elements based on the criteria computed, for each element, by the iterator.

 

Note: this makes any object that mixes in Enumerable amenable to the $A utility function.

 

Examples

 

$R(15).toArray()

// -> [1, 2, 3, 4, 5]

 

Performance considerations

 

Obviously, objects that mix in Enumerable may override the default code, as Array does.

 

See also

 

Array: toArray


Prototype API 1.5.0 - prototypejs.org