Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,104 questions

40,777 answers

573 users

How to use for loop with index in Go

1 Answer

0 votes
package main

import "fmt"

func main() {
    for i := 0; i < 5; i++ {
        fmt.Println(i)
    }
}



/*
run:

0
1
2
3
4

*/

 





answered Oct 28, 2020 by avibootz

Related questions

1 answer 96 views
96 views asked Oct 28, 2020 by avibootz
1 answer 59 views
4 answers 62 views
62 views asked Jun 10, 2023 by avibootz
1 answer 95 views
1 answer 102 views
...