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 Getting Started With ES2015!
You have completed Getting Started With ES2015!
Preview
Using constants is are a best practice when assigning variables but what happens when you do actually want to reassign a value? That's where let comes in.
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
Let's take a look at a simple example.
0:00
Open up let.html, and you can see
we've got a score that equals 0,
0:01
an age that equals 33, and a Boolean,
isHungry, that equals false.
0:06
Open up the preview, and
navigate to let.html.
0:13
Open up the Console, And
let's try and modify the score.
0:20
The score can change through a game,
0:27
the score increments by one each time
the player completes a challenge.
0:29
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