spbooks / jsninja1

Code archive for the book JavaScript: Novice to Ninja
176 stars 135 forks source link

ReferenceError: Can't find variable: i #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

variable i is local scope in function play(), the variable i in function check() causes this error because it is not declared either in global scope or the function local scope.

ghost commented 9 years ago

Didn't realise it is a nested function, mistakenly opened pull request.