Write a Python program to get the sum of a given array of numbers.
[1, 2, 3]
def get_sum(nums):
    sum = 0
    for num in nums:
        sum += num
    return sum

result = get_sum([1, 2, 3])
print(result)
# Output: 6