Grokking Go
Vote

0% completed

​

Assignment operators

Assignment operators in Go are used to assign values to variables. These operators help simplify expressions by combining an operation with an assignment.

List of Assignment Operators in Go

OperatorDescriptionExampleEquivalent To
=Assigns a valuex = 10x = 10
+=Adds and assignsx += 5x = x + 5
-=Subtracts and assignsx -= 3x = x - 3
*=Multiplies and assignsx *= 2x = x * 2
/=Divides and assigns

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content