daily pastebin goal
62%
SHARE
TWEET

[Go] Comparison operators

cwchen Sep 9th, 2017 330 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5. )
  6.  
  7. func main() {
  8.     a := 5
  9.     b := 3
  10.  
  11.     fmt.Println(a == b) // false
  12.     fmt.Println(a != b) // true
  13.     fmt.Println(a > b)  // true
  14.     fmt.Println(a >= b) // true
  15.     fmt.Println(a < b)  // false
  16.     fmt.Println(a <= b) // false
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top