30. Go - Conversion
Convert one type to another type if there is a similar underlying type.
var xx int
var toddAge variableNameAge = 50
xx = int(toddAge)
fmt.Println(xx)
Converted toddAge (type variableNameAge) to an int to be able to declare as xx which is type int.
Comments
Post a Comment