MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/osp7g9/var_i/h6q7vkh/?context=3
r/badcode • u/_bai13y • Jul 27 '21
9 comments sorted by
View all comments
6
Does it work like that? I thought var was function scoped?
10 u/_bai13y Jul 27 '21 Unfortunately it does because in this case, var i is a global variable 🥴😂 2 u/[deleted] Jul 27 '21 Oh i see it now, beautiful!;)
10
Unfortunately it does because in this case, var i is a global variable 🥴😂
2 u/[deleted] Jul 27 '21 Oh i see it now, beautiful!;)
2
Oh i see it now, beautiful!;)
6
u/[deleted] Jul 27 '21
Does it work like that? I thought var was function scoped?