(arr)
| 109 | // base case |
| 110 | // recursive step |
| 111 | function recurseArr(arr) { |
| 112 | |
| 113 | if(arr.length === 0) return 'done recursing'; |
| 114 | |
| 115 | // how do we shorten the array - pop, shift, slice rest, spread |
| 116 | let popped = arr.pop(); |
| 117 | console.log(popped, arr); |
| 118 | |
| 119 | recurseArr(arr); |
| 120 | }; |
| 121 | |
| 122 | // console.log(recurseArr([1,2,3])); |
| 123 | /* |
nothing calls this directly
no outgoing calls
no test coverage detected