Grokking Go
Vote

0% completed

​

Relational Operators

Relational operators, also known as comparison operators, are used to compare two values. These operators return a Boolean result (true or false) based on the comparison.

List of Relational Operators in Go

Examples

Example 1: Comparing Integer Values

  • a == b checks if a and b are equal, returning false because 15 != 10.
  • a != b checks if a and b are different, returning true.
  • a > b evaluates if a is greater than b, which is true.
  • a < b checks if a is smaller than b, which is false.
  • `a >= b

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content