DEV Community

Discussion on: Daily Coding Puzzles - Nov 4th - Nov 9th

Collapse
 
thejessleigh profile image
jess unrein

Go

func Product(nums []int)(x int) {
    x = 1

    for _, num := range nums {
        x *= num
    }
    return
}