Section 1 - Instruction

You've learned about local and global scope. Now let's practice identifying scope patterns and understanding how variables behave in different contexts.

Engagement Message

Ready to become a scope expert?

Section 2 - Practice

Type

Multiple Choice

Practice Question

What will this code print?

A. "Inside function" then "Inside function" B. "Inside function" then undefined C. "Inside function" then the code will cause an error D. The code will cause an error immediately

Suggested Answers

  • A
  • B
  • C - Correct
  • D
Section 3 - Practice

Type

Multiple Choice

Practice Question

What will this code print?

A. "Global" then "Local" B. "Local" then "Global" C. "Global" twice D. "Local" twice

Suggested Answers

  • A
  • B - Correct
  • C
  • D
Section 4 - Practice

Type

Swipe Left or Right

Practice Question

Match each variable access with whether it will work or cause an error by swiping left or right.

Labels

  • Left Label: Will Work
  • Right Label: Will Cause Error

Left Label Items

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal