javascript-variables Flashcards
1
Q
What is a variable?
A
Variable means anything that can vary. JavaScript includes variables which hold the data value and it can be changed anytime
2
Q
Why are variables useful?
A
Rather than entering data directly into a program, a programmer can use variables to represent the data.
3
Q
What two special characters can a variable begin with?
A
$ or _
4
Q
How do you declare a variable?
A
var
5
Q
How do you assign a value to a variable?
A
=
6
Q
Are variables case sensitive?
A
Yes extremely case sensitive. Use camel case to stay consistent.
7
Q
Which words cannot be used as variable names?
A
“Function” “var” and any other keywords.