Created
July 12, 2018 14:48
-
-
Save hi-manshu/6413e7772b56d8a877689e66d866264a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // this is how we declare the Boolean Varibales in go | |
| // Here isMyNameHimanshu variable is declared specifing a data-type | |
| var isMyNameHimanshu bool = true | |
| // Here isMyNameHimanshu variable is declared without specifing a data-type | |
| var isMyNameHimanshu = true | |
| //here the varibale is declared without using the var keyword | |
| isMyNameHimanshu:= true | |
| //Output after running go run booleanExample.go | |
| >> fmt.Println(isMyNameHimanshu) | |
| >> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment