Beast Code Interview Question

Explain how variable scoping works.