[Go] using For loop as While loop
There is no While loop in Go, but you can use For loop as while loop:
i := 1
for i < 100 {
fmt.Println(i)
i += 1
}
func main() {
var myTxt = "This is a sentence"
for index, letter := range myTxt {
fmt.Println("Index:", index, "Letter: ", string(letter))
}
}