// Variable declaration
// Assign value to the variable
x = 6;
- Local variables: Declare a variable inside the scope of a block.
- Global variables: Declare a variable outside of a function or with the help of a window object.
Expressions are made up of values, operators, and variables. It's used to calculate the values.
- Primitive data type
- Non-primitive (reference) data type