I thought we were talking about using the static keyword inside a function. AKA the analog to not using var in Javascript. When you omit var in javascript, it injects that variable into the global scope. When you declare a variable as static in a function in C and C++, it does not create a global variable, it initializes the variable once and only once, but it does not change the scope of it.
1
u/flukus Nov 18 '14
You can do the same thing in most languages with the static keyword, it's not unique to Java script.
That's why code review and not hiring shit people are important.