• function

reverse can.Observe.List.prototype.reverse

 

Reverse the order of a List.

list.reverse()

reverse reverses the elements of the List in place.

Returns

{can.Observe.List}

the List, for chaining

var list = new can.Observe.List(['Alice', 'Bob', 'Eve']);
var reversedList = list.reverse();

reversedList.attr(); // ['Eve', 'Bob', 'Alice'];
list === reversedList; // true