Comment on Why does the for loop repeat in this recursion?

<- View Parent
jrbaconcheese@yall.theatl.social ⁨9⁩ ⁨months⁩ ago

No, the moment that draw(9) is called, draw(10) goes on pause while draw(9) finishes… which repeats (or recurses) until draw(0) gets called. Then it _return_s which returns to draw(1). The draw(1) un-pauses and does the #\n bit and returns to draw(2), which un-pauses and does ##\n and so forth until draw(10) does ##########\n

source
Sort:hotnewtop