• Constants

    Constants in programming are special variables that hold once piece of data that can never change once defined. They are like defining water in chemistry - no matter what you do, water will always be defined as H20. In programming, constants can be words or letters that stand for something special. Constants allow us hold data throughout our program without having to assign them to new variables multiple times.

      • Immutable Constants

      • Go

        Example of contant variable in go.
        package main
        
        import "fmt"
        
        const IMMUTABLE = "unchangeable"
        
        func main() {
        	fmt.Println(IMMUTABLE) // unchangeable
        }