Difference between revisions of "Loop"

From wikieduonline
Jump to navigation Jump to search
(Created page with " == Infinite loop == go <pre> sum := 0 for { sum++ // repeated forever fmt.Println(sum) } <pre>")
 
Line 11: Line 11:
 
     fmt.Println(sum)
 
     fmt.Println(sum)
 
}
 
}
<pre>
+
</pre>

Revision as of 06:17, 29 April 2020


Infinite loop

go

sum := 0
for {
    sum++ // repeated forever
    fmt.Println(sum)
}

Advertising: