Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Defining Variables with let and const!
You have completed Defining Variables with let and const!
Preview
Let's review the original way to declare a variable and how that differs with the modern let and const keywords.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Lifelong learner, and
JavaScript teacher here at Treehouse.
0:00
For most of JavaScripts life,
there's been only one way to create or
0:01
declare a variable.
0:05
Using the var keyword.
0:07
Most JavaScript programmers
learned this method, and
0:09
a lot still use the var keyword.
0:12
But some of the behaviors from using
var can be problematic or unexpected.
0:13
That's why developers of
the JavaScript programming language
0:19
decided to introduce new ways for
creating variables.
0:22
The sixth version of JavaScript,
called ES2015, or
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up