We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1febec6 + 24d988a commit 452a705Copy full SHA for 452a705
3 files changed
110-Booleans/boolean-1.gop
@@ -0,0 +1,7 @@
1
+// The bool type represents Boolean variables. Variables of bool type can have
2
+// one of two values: true or false. The zero value for a bool is false.
3
+
4
+var flag bool // no value assigned, set to false
5
+var isAwesome = true
6
7
+println(flag, isAwesome)
110-Booleans/boolean-2.gop
@@ -0,0 +1,5 @@
+// In go+, you can cast bool to number types.
+println int(true) // 1
+println float64(true) // 1
+println complex64(true) // (1+0i)
110-Booleans/boolean.gop
0 commit comments