Explanation
In JavaScript, a valid variable name must follow these rules:
- It must start with a letter (A–Z, a–z), underscore (_), or dollar sign ($).
- It cannot start with a number.
- It cannot contain hyphens (-).
- It cannot be a reserved keyword such as var, if, for, etc.