Deviopath › Go

Keep the Evens

Easy · Slices

append adds to a slice and returns the (possibly new) slice. Start from nil or []int{} and append the even numbers in order.

Write Evens(numbers) that returns a new slice of the even values, in the same order.

Next: Double Each Value