I need make a range from 1 to 15 and some kind of reverse. Currently i using next script:
$scope.range = (min, max) ->
input = []
i = min
while i < max
input.push i
i += 1
input
so if put range(1,15) it will be 1 2 3 4 5 6 7 8 9 10 11 ... 15
What i need is in case when range(10, 3) it should put 10 11 12 13 14 15 1 2 3