In Javascript, scope is the area in which you can use a variable. There are two types of scope, global and local. Global variables can be accessed from anywhere in your Javascript file. They are set outside of any function. They are useful if you have a lot of functions that take information from the same variable.
Variables with local scope are created inside a function, and cannot be accessed outside of that function. These variables can be confusing, because you can't use them outside of that scope, but they are also very useful as you can use the same variable name to represent two different things. For example, a stand in variable like "i" can be used in multiple functions. The value that i represents is only specific to that function, so you only have to look at one piece of code to tell what's going on.