Advertisement
cwchen

[Go] Iterating through an array, with dummy variable.

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