SumSum#func Sum(num ...int) intThe Sum() method calculates the sum of the sequence:gmath.Sum(1, 2, 3) // => 6gmath.Sum([]int{10, 20, 30, 51}...) // => 111gmath.Sum(-10, 2, 3) // => -5gmath.Sum() // => 0Copy