AI Features

Scope and Shadowing

This lesson teaches you about the scope of a variable.

Scope of a variable

The scope of a variable refers to the visibility of a variable, or , which parts of a program can access that variable.

It all depends on where this variable is being declared. If it is declared inside any curly braces {}, i.e., ...

Ask