var arr = [1,2,3,4,5], i = arr.length; while (arr[--i]++); alert(arr);
var arr = [1,2,3,4,5,0], i = arr.length; while (arr[--i]++); alert(arr);