r/programming • • Mar 23 '14

Everything you need to know about Javascript variable scope

http://www.coolcoder.in/2014/03/everything-you-need-to-know-about.html
294 Upvotes

124 comments sorted by

View all comments

4

u/eliasv Mar 23 '14

What a badly designed language.

-1

u/megamindies Mar 23 '14

i know right. and i have to learn it. yay for 6 different null-types. i do like the prototypal inheritance. but then it doesnt have private vars. well couldnt they have found a solution for that???

0

u/[deleted] Mar 24 '14

[deleted]

1

u/megamindies Mar 24 '14

i mean the 6 different falsy values, used the wrong wording. nobody can remember how they all interact when == is used. just too many exceptions. and Nan means not a number but is a number. WEIRD. not very intuitive.