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 JavaScript Basics!
You have completed JavaScript Basics!
Preview
Once you declare a variable and assign it a value, your program can manipulate what's stored in the variable as it runs, like a score in a game, for example.
Resources
- Addition (
+) – MDN - [Addition assignment operator – MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Addition_assignment
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
Remember, variables hold
values that can change.
0:00
Once you declare a variable and assign
it a value, your program can manipulate
0:02
what's stored in the variable as it runs,
like the score in a game for example.
0:06
You can use variables to do
a variety of different things
0:11
with the value stored in or
assigned to them.
0:14
Remember the variable score,
it holds a number value, let's say zero.
0:17
Earlier you learn that you can
change what's inside a variable
0:22
through reassignment like this,
score = 10.
0:27
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