Learn what the global variable challenge is for this chapter.
(light cymbals)…- [Instructor] There's no better way to learn…than to challenge yourself to do what we just learned,…and we'll do just that.…So here's the challenge.…I want you to declare an array of warriors…that is globally scoped and then a global function…that will log in the const of this list of warriors.…If you're familiar with the const and let variables,…feel free to use them to declare your variables,…and if not, you can use var too.…It's not really that important for this exercise,…as long as you have all your declarations globally scoped.…
- What is variable scope?
- What are closures?
- Global vs. local variables
- Block-scoped variables
Skill Level Intermediate
1. Introduction to Variable Scope
2. Global Variables
What are global variables?5m 11s
3. Local Variables
4. Block-Scoped Variables
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.