Learn what the block-scoped variable challenge is for this chapter.
- [Narrator] Okay, so now let's put all…this new knowledge together in a final challenge.…Since ES6 and beyond uses mostly const and let,…in this challenge, we'll only use those two.…So here's the new challenge, first declare…an immutable variable in the global scope…listing a few warriors and their attributes.…Then in a function, if the attribute of a warrior…meets a certain requirement,…list that warrior into the console.…Also, constantly log what variables is accessible where…so you demonstrate to yourself you understand their scope.…
Feel free to leverage some of the examples…with it today in this course and good luck.…
- 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.