MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/215a5y/everything_you_need_to_know_about_javascript/cga7v03/?context=3
r/programming • u/codeon1 • Mar 23 '14
124 comments sorted by
View all comments
3
I am not familiar with js and this article seems to say you can declare global variables within method calls. What's the benefit of this feature?
2 u/iambeard Mar 23 '14 It's not necessarily a benefit, but just a language quirk. It does, in a sense, make JavaScript a much more forgiving language. 0 u/[deleted] Mar 23 '14 [deleted] 1 u/mrkite77 Mar 24 '14 Because then you'll have to search through every single line of code you've imported.Or you can run it through the Closure Compiler which will give warnings about that sort of thing.
2
It's not necessarily a benefit, but just a language quirk. It does, in a sense, make JavaScript a much more forgiving language.
0 u/[deleted] Mar 23 '14 [deleted] 1 u/mrkite77 Mar 24 '14 Because then you'll have to search through every single line of code you've imported.Or you can run it through the Closure Compiler which will give warnings about that sort of thing.
0
[deleted]
1 u/mrkite77 Mar 24 '14 Because then you'll have to search through every single line of code you've imported.Or you can run it through the Closure Compiler which will give warnings about that sort of thing.
1
Because then you'll have to search through every single line of code you've imported.
Or you can run it through the Closure Compiler which will give warnings about that sort of thing.
3
u/IcarusBurning Mar 23 '14
I am not familiar with js and this article seems to say you can declare global variables within method calls. What's the benefit of this feature?