Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

ZIG ZAG AND ZOOM understand a code please


Hello, derrepente look silly this question but I wonder if someone can explain me this code because I believe this function

function mod15 (n){
while(n >= 15){
n -=15

return n

said generates a number between 0 and 15
but if I 0 to subtract income is not going to enter -15?

1 Like

If n == 0 then while(n >= 15){ doesnt call and function will return 0.

1 Like