Scope is whether a variable or function is accessible from only within the function that you are currently in, or whether it can be accessed from anywhere in your code. If it has global scope, it can be referenced anywhere in the code, but if it has local scope, it can only be referenced within the local scope. Local scope is created by defining a function. Any variable created within a function has local scope, and is only visible within that function. You cannot call that variable from outside the function. If you have a function within a function, the inner function can reference a variable from the outer function, as they are within the same local scope.