Nice article, and I'm actually about to make a video on this exact same subject!
I noticed that when you do the for loop, there's i = 0, instead of let i = 0, and this could result in the creation (or mutation) of a global variable. Funny enough, iis a global variable on dev.to at the moment, and it's value is 0! But once you run the code above, it gets updated.
Nice article, and I'm actually about to make a video on this exact same subject!
I noticed that when you do the
for
loop, there'si = 0
, instead oflet i = 0
, and this could result in the creation (or mutation) of a global variable. Funny enough,i
is a global variable on dev.to at the moment, and it's value is0
! But once you run the code above, it gets updated.Good job on this article!
Nice catch!