## Definition
To introduce a [[variable]] by giving it an [[identifier]] and reserving space in [[random-access memory|memory]], without assigning it a value.
*Verb. Noun form: declaration.*
> You need to declare the variable `total` before it can be assigned a value.
## Characteristics
- Establishes the variable's identifier;
- separates identification from assignment in languages like C and Java;
- can establish a variable's data type; and
- not required in all languages—in Python, variables never need to be declared before they are initialised.
## Examples
### Declaring a variable of type `int` (C)
```C
int x; // x now refers to a reserved memory location, but has no value yet ```
```
### Declaring a variable (JavaScript)
```javascript
let x;
```
## Non-examples
### Initialising a variable (Python)
```python
x = 5 # not a declaration as now refers to a value
```
### Updating the value of a variable (C)
```C
int x; // declaration
x = 5; // initialisation
x = 10; // reassignment
```