This blog post explains how variables are scoped in JavaScript. It points out two things that can cause problems if you are not aware of them: JavaScript variables are function-scoped and they can be captured in closures.
More
Give back to creators
Give microdonations when you Like, Favorite & Star.
