From the course: JavaScript: Scope
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Define let/const variables - JavaScript Tutorial
From the course: JavaScript: Scope
Challenge: Define let/const variables
- [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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.