return inner range recursive

Solutions on MaxInterview for return inner range recursive by the best coders in the world

showing results for - "return inner range recursive"
Luana
13 May 2016
1function count(n) {
2  if (n === 1) {
3    return [1];
4  } else {
5    var numbers = count(n - 1); 
6    numbers.push(n);
7    return numbers;
8  }
9}
10