Last active
July 12, 2018 14:20
-
-
Save hi-manshu/6ca8121e8d23343fa38bea984ea682d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We declare variable in Go | |
var variableName dataType | |
//Here firstName is variable of data-type string | |
eg: var firstName string = "Himanshu" | |
// We can define multiple variables with same dataTypes | |
var variableName, variableName, variableName dataType | |
//Here multiple variable are declared of same data-type | |
var firstName,lastName string | |
// We can also define variable with a initial value | |
var variableName type = value | |
//Here firstName is variable where it is assigned a value Himanshu | |
eg: var firstName string = "Himanshu" | |
// We can also define multiple variables with initial values | |
var variableName1, variableName2 type = value1, value2 | |
//Here multiple variable are declared of same data-type | |
var firstName,lastName string = "Himanshu","Singh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment