- Identifiers cannot be a keyword.
- Identifiers are case-sensitive.
- It can have a sequence of letters and digits. However, it must begin with a letter, $ or _. The first letter of an identifier cannot be a digit.
- It's a convention to start an identifier with a letter rather and $ or _.
- Whitespaces are not allowed.
- Similarly, you cannot use symbols such as , #, and so on.
Here are few valid and invalid identifiers.
Valid
score
level
highestScore
number1
convertToString
Invaid
class
float
1number
highest Score
@pple