Go Operators

Operators in Go are tools for performing operations on variables and values. For example, the + operator can be used to add two values together.

Tutorials dojo strip



Example:

Go

Output:

Go




The + operator can also add a variable with a value or another variable:

Example:

Go

Output:

Go




Types of Go Operators

Go divides its operators into the following categories:

  1. Arithmetic operators
  2. Assignment operators
  3. Comparison operators
  4. Logical operators
  5. Bitwise operators
Tutorials dojo strip