MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/192tn4/common_javascript_gotchas/c8kee4i/?context=3
r/javascript • u/stevekwan • Feb 23 '13
50 comments sorted by
View all comments
2
He says you should never ever have a global variable or global function. Do other people agree with that?
2 u/mirion Feb 23 '13 No, lol. It shouldn't be abused, but it is extremely useful in limited circumstances. You can't, for example, use write library code without it.
No, lol. It shouldn't be abused, but it is extremely useful in limited circumstances. You can't, for example, use write library code without it.
2
u/dangoodspeed Feb 23 '13
He says you should never ever have a global variable or global function. Do other people agree with that?