Go Back
JavaScript Valid Variable Names
The valid variable names can contain letters (both uppercase and lowercase),
numbers, underscores, and dollar signs. However, the variable names can not begin with numbers.
Rules for variable name:
- Spaces are not allowed in variable names.
- Hyphens are not allowed in variable names.
- Only letters, numbers, underscores, and dollar signs are permitted in variable names.
- Case matters when it comes to variable names.
- Variable name always starts with a letter (alphabet), underscore (_), or a dollar sign ($), i.e. any other special characters not allowed.
- Reserved keywords are not allowed.
Pascal Case
FirstName
MiddleName
LastName
BirthPlace
BirthDate
Camel Case
mobileNumber
emailAddress
permanentAdress
permanentProvince
permanentMunicipality
Snake Case
user_name
student_id
full_name
car_name
car_brand
With Special Characters
$gender
geek123
_age