Lesson

Learn Javascript 2017, Scoping, Codecademy

Lesson Summary

In this challenge we are giving a function myApartment() which contains variables that we want to access outside of our code. Since the previous javascript lessons taught us that a variable must be created globally if we want to access it globally. Variables created inside functions are local to that function.

Share: