// letsDoLoops runs "for" statement a couple of ways
letsDoLoops runs "for" statement a couple of ways
// letsDoLoops runs " for " statement a couple of ways
func letsDoLoops(start, stop int) int {
	sum := 0
	for i := start; i < stop; i++ {
		sum += i
	}
	for sum < 20 {
		sum += 1
	}
	for true {
		break
	}
	list := [6]int{1, 2, 3, 5, 7, 11}
	for _, v := range list {
		sum += v
	}
	for i := range list {
		sum += list[i]
	}
	return sum
}
func letsDoLoops ( start , stop int ) int { sum := 0 for i := start ; i < stop ; i ++ { sum += i } for sum < 20 { sum += 1 } for true { break } list := [ 6 ] int { 1 , 2 , 3 , 5 , 7 , 11 } for _ , v := range list { sum += v } for i := range list { sum += list [ i ] } return sum }
letsDoLoops runs "for" statement a couple of ways
letsDoLoops runs " for " statement a couple of ways
// we start with traditional for loop // next is "while" loop // next is infinit loop // but we are not going to wait forever // let's try range, which returns index and value // or just index