So I'm reading this article about JavaScript Lexical scoping, and the author points out that "JavaScript is not truly static". He then "proves" this by the following example:
var count = 5;
function tellCount() {
console.log(count);
};
tellCount(); //prints 5
count = 7;
tellCount(); //prints 7;
What am I missing here? He put the count variable in the global namespace as five, calls the method that references the global variable and prints five, then changes the global variable to seven and calls the method again. If I'm not mistaken, changing a global variable and re-calling a method that uses the variable would do this in any statically scoped language.
Does the author truly prove that JavaScript is not truly statically scoped?
Note: I know that eval in JavaScript introduces a form of dynamic scope into JS, but I'm more interested on proving / disproving what this author wrote.