Variables Flashcards

1
Q

Variable

A

A container which is used to store data e.g numbers or text

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

Constant

A

Data that does not change throughout the script

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

What is a variables name called

A

It’s identifier

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

What is rule 1 when using an identifier

A

An identifier must contain no spaces, or begin with a number

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

What is rule two when using identifiers

A

The identifier must be descriptive

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

What is rule three when using variables

A

It must be snake or camel case

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

What is rule four when using identifiers

A

The identifier cannot be too long

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

What is rule five when using identifiers

A

It cannot be a keyword

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

What is an example of snake case

A

boy-age etc

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

What is an example of camel case

A

boyAge etc

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