I'm going through some golang tutorials, and I came across this for
loop:
for n := 0; n <= 5; n++ {
if n%2 == 0 {
continue
}
fmt.Println(n)
}
I'm confused by the n%2
statement.
The output of this is:
1
3
5
It looks like these are not multiples of 2, but I'm not understanding the == 0
part of the statement if that's the case? Is there a resource that talks about this operation, or something I should look up?