---
# System prepended metadata

title: Constants and IOTA

---

# Constants and IOTA

# What is IOTA?
A Built-On Constant generator that generates increasing number.

Sometimes we need number to keep increasing but typing them one by one is actually a waste of time, like it is shown below:
```go=
const (
    monday = 0
    tuesday = 1
    wednesday = 2
    thursday = 3
    friday = 4
    saturday = 5
    sunday = 6
)
```

That is why we just use **IOTA** to solve this problem.

```go=
const (
    monday = iota
    tuesday
    wednesday
    thursday
    friday
    saturday
    sunday
)

fmt.Println(monday, tuesday, wednesday, thursday, friday, saturday, sunday)

//This prints out "0 1 2 3 4 5 6"
```

# Blank Identifier in Const
The blank Identifier in const, helps us skip one turn by using underscore.

Before entering the example, let's first take a look at the timezones.
>Timezone
>EST -5  (Eastern Standart Time and 5hrs behind UTC)
>MST -7  (Mountain Standard Time is behind UTC by 7hrs)
>PST -8  (Pacific Standard Time is behind UTC by 8hrs) [color=pink]
>**Note:** UTC is universal time

**Example:**
```go=
const (
    EST = -(5 + iota)
    _
    MST
    PST
)

fmt.Println(EST, MST, PST)
//Prints: -5 -7 -8
```

By using **_**, we let iota increase number by 1 in that gap, that is how we let MST and PST have the right numbers. 
If we did not use **blank identifier** then we would have obtained the wrong log, which would look like -5 -6 -7.