reverse()

suckgamoni edited this page May 15, 2013 · 1 revision

Inverts the order of the elements in a sequence.

Syntax

Return Value

A sequence whose elements correspond to those of the input sequence in reverse order.


Example

var apple = "apple";
var reversed = from(apple).reverse();

reversed.each("console.log($ + ' ')");

/*
 This code produces the following output:

 e l p p a
*/