Advertisement
cwchen

[Go] Iterating through a slice.

Sep 20th, 2017
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.15 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     langs := []string{"Go", "Python", "Ruby", "PHP"}
  7.  
  8.     for _, e := range langs {
  9.         fmt.Println(e)
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement