var list = new can.List(['Alice', 'Bob', 'Eve']);
var reversedList = list.reverse();
reversedList.attr(); // ['Eve', 'Bob', 'Alice'];
list === reversedList; // true
reverse calls replace internally and triggers corresponding add, remove, change and length events respectively.
reverse
callsreplace
internally and triggers correspondingadd
,remove
,change
andlength
events respectively.Demo