Challenge: Variable Number of Arguments

This lesson brings you a challenge to solve.

Problem statement

Make a function that returns the sum of variable number of integer arguments.

Input

Series of n integers (n=0,1,2,3,...n=0,1,2,3,...)

Output

Sum of the given n integers

Sample input

5,-2,0,9

Sample output

12

Try to implement the function below. Feel free to view the solution, after giving some shots. Good Luck!

Get hands-on with 1200+ tech skills courses.