Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1987

Constant In Golang 2019

$
0
0
In the below program we create the variable x and assign value 10 after this we again assign value 12 to the same variable x and we print this on the console which is working fine. By using this you will know we can change the value of variable anytime in our program.



Code:
package main

import (
    "fmt"

    "./utilitypackage"
)

func main() {

    //fmt.Println(utilitypackage.Reverse("sagar"))
    //utilitypackage.CreateDataTypes()

    var x = 10
    fmt.Println("val is x", x)

    x...
Constant In Golang 2019

Viewing all articles
Browse latest Browse all 1987

Trending Articles