Gopher-dojo-lt.pdf

ogidow
December 03, 2018
130

 Gopher-dojo-lt.pdf

ogidow

December 03, 2018

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

19 slides
  1. (Pݴޠͩͱ ۪௚ʹ࣮૷ package main import ( "fmt" ) func main()

    { arr := []string{"hoge", "fuga", "foo"} fmt.Println(reverseArray(arr)) } func reverseArray(arr []string) []string { maxLen := len(arr) res := []string{} for i := maxLen - 1; i >= 0; i-- { res = append(res, arr[i]) } return res }