-
The Basics of Scope in JavaScript
Whether you’re coming to JavaScript from another language, or you’re learning JavaScript as your first language, the way scope works — that is, when and where your variables are defined — might surprise you. In this instalment of Head First JavaScript Programming Teasers, you’ll learn about the basics of scope, why it’s important to limit…