9951 explained code solutions for 126 technologies


golangHow to implement while loop


package main

func main() {
	t := 0
	for t > -10 {
	  t -= 1
	}
	print(t)
}ctrl + c
package main

default package declaration

func main() {

declare main function that will be launched automatically

for t > -10 {

we can use only a single condition to check if for loop which is identical to while loops in other languages