07. Scope πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ› Messages Not Logging to Console Due to Undefined Variables

Work with a partner to resolve the following issue(s):

  • As a developer, I want to log messages to the console using variables declared in both global and local scope.

Expected Behavior

When the console is opened, a series of messages should log to the console.

Actual Behavior

When the console is opened, an error message indicates that at least one variable is undefined, and messages do not log.

πŸ’‘ Hints

Think about how the variable is being used. Is it being made available to all functions, or is it only being used by one function?

πŸ† Bonus

If you have completed this activity, work through the following challenge with your partner to further your knowledge:

  • What are lexical and block scope?

Use Google or another search engine to research this.


βœ… Solutions

Solutions Click Here