Declaring Variable
Declaring Variable Rule
- Variable can contain a combination of letters, digits, underscores ( _ ), and
- dollar signs ( $ ).
- Must begin with a letter A-Z or a-z or underscore or dollar sign
- A variable name cannot start with a number
- Must not contain any space characters
- JavaScript is case-sensitive
- Can‟t use reserved keywords
Declaring Variable
![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/declaring-variable-1.png)
A variable declared without a value will have the value undefined
![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/declaring-variable-in-javascript.jpg)
Latest posts by rajeshkumar (see all)