Javascript Variables Flashcards

1
Q

What does the = (equals) operator do in Javascript?

A

It’s an assignment operator which sets a value to a variable.

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

Which keyword is used to declare a variable in Javascript?

A

Var

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

Which characters is a Javascript variable allowed to begin with?

A

Uppercase, lowercase, underscore, and $.

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

What are quotation marks used for in JavaScript?

A

For strings.

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

What is the purpose of strings in JavaScript?

A

Storing any sort of text data.

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

What is the purpose of booleans in JavaScript?

A

Logic, so a true/false value.

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

What is the purpose of numbers in JavaScript?

A

Using it to calculate quantities.

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

What does null mean in JavaScript?

A

Null is an intentional absence of a value.

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