You are making a program to calculate the sum of any number of values. Complete the given function so that it takes as parameters as many numbers as needed and returns the sum. // I want to understand this, but no luck after 30 + minutes. Please help. https://code.sololearn.com/cT4Xmj400fpV/?ref=app
2/16/2022 1:15:17 AM
Tahiti🌍Castillo2 Answers
New AnswerIn your code, 'rest' variable is already an array. No need to initialize it again. We just need to run a for loop over the rest array, add all the items and return the final sum. That's it. 👍
Morpheus ! I’ve been waiting to see you here. Thank you for that advice, and I will try it! 🙏
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message