Please check the below sample code, and look into 3rd line.
a := [3]int{10,20}
var i int = 50
i, a[2] = 100, i
fmt.Println(i) //100
fmt.Println(a) //[10 20 50]
I have overwritten the value 100 in i variable and immediately applied the int array. When I printed the array, the new value was not printed. How does multiple variable assignment work in Go? Why the i value is not updated into the array immediately?