Given an array of integers nums, return the sum of all elements in the array as an integer. If the array is empty, return 0.
nums
0