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 Quickstart!
You have completed JavaScript Quickstart!
Preview
JavaScript provides a way to store and keep track of information in a program with variables. Variables are one of the most important concepts in JavaScript, and programming in general.
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
Wouldn't it be great if we could also
store and use this value in our program,
0:00
like post it to a list of users or
display it somewhere on the page?
0:00
Well, JavaScript provides
a way to store and
0:04
keep track of information in
a program with variables.
0:06
Variables are one of the most
important concepts in JavaScript and
0:09
programming in general.
0:12
For example,
0:14
I'll use a variable to store the message
to display in a prompt dialogue box.
0:15
To declare a variable,
0:20
you use the key word var followed by
the name you want to give the variable.
0:22
I'll name it question.
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