Please enable JavaScript to use CodeHS

CodeHS Glossary


Variable Shadowing General

If two variables have the same name, and exist inside of the same scope, the variable with the *more specific* scope takes precedence. This is called shadowing. Local variables and parameters shadow the more general global variables (instance variables).