function foo(num) {
console.log("foo: " + num);//6 7 8 9
this.countPP;
}
foo.count = 0;
var i;
for(i = 0; i < 10; iPP){
if(i > 5){
foo( i );
}
}
console.log(foo.count);// 0
console.log(count);//NaN
outputs 6, br, 7, 8, and 9, I know, and
outputs 0 because this.count points to the global.
the question is why the hidden test count created is NaN?.
called the foo function and implicitly tried to create a global attribute count,
count = undefined. Undefined PP is NaN?.