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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why are variables useful?

A

Rather than entering data directly into a program, a programmer can use variables to represent the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What two special characters can a variable begin with?

A

$ or _

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you declare a variable?

A

var

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you assign a value to a variable?

A

=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Are variables case sensitive?

A

Yes extremely case sensitive. Use camel case to stay consistent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which words cannot be used as variable names?

A

“Function” “var” and any other keywords.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly