Variables Flashcards
1
Q
Variable
A
A container which is used to store data e.g numbers or text
2
Q
Constant
A
Data that does not change throughout the script
3
Q
What is a variables name called
A
It’s identifier
4
Q
What is rule 1 when using an identifier
A
An identifier must contain no spaces, or begin with a number
5
Q
What is rule two when using identifiers
A
The identifier must be descriptive
6
Q
What is rule three when using variables
A
It must be snake or camel case
7
Q
What is rule four when using identifiers
A
The identifier cannot be too long
8
Q
What is rule five when using identifiers
A
It cannot be a keyword
9
Q
What is an example of snake case
A
boy-age etc
10
Q
What is an example of camel case
A
boyAge etc