_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript ಡΈ͍͢ͷͲͬͪʁ
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript ੜ࢈ੑ͕ߴ͍ͷʁ
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript ࣮ߦͷޮ͕͍͍ͷʁ
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript ίϯύΠϥ͕ղऍ͍͢͠ͷʁ
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript ͲͪΒҙਤ͕ͳ͍
_, n := range li { if n%2 == 0 { ret = append(ret, n) } } for i := range ret { ret[i] = ret[i] * 2 } return ret } Golang li.filter(n => n % 2 === 0) .map(n => n * 2) Javascript ͲͬͪͰ͍͍