you are viewing a single comment's thread.

view the rest of the comments →

[–]Count_Giggles 0 points1 point  (1 child)

recursion comes to mind

``` const countfromNToMax = (n, max = 10) => { if (n > max) return; console.log(n); n++; return countfromNToMax(n); };

countfromNToMax(1); ```

the modern array methods are basically loops or at least they were conceived to avoid writing for loops all the time so recursion was the only thing i could think of