Open swati-jagtap opened 3 years ago
function anyArgument() { let sum=0; for(let i=0;i<arguments.length;i++) { sum+=arguments[i]; } return sum; } console.log(anyArgument(10,20,30,40)); console.log(anyArgument(1,22,30,4))
7.2.14 Write a function which takes any number of arguments and return the sum of the arguments
output