golangUsing AND operator
package main
import (
"fmt"
)
func main() {
X := true
Y := false
xor := X && Y
}ctrl + c&&logical |
Usage example
package main
import (
"fmt"
)
func main() {
X := true
Y := false
fmt.Println(X && Y)
}
output
false
More of Golang
- How to make POST (form data) request using HTTP client
- How to use proxy with HTTP client
- How to iterate over a slice in reverse order
- How to sleep for 500 milliseconds
- How to read file to bytes array
- How to print new line with printf()
- How to set user agent for HTTP request
- How to generate random int
- How to use range with map
- How to sleep for 1 minute
See more codes...