I’ve had trouble writing this code. I’m supposed to make a function that can take either an array of numbers or the arguments array and calculate the average without using a for or while loop. It says I have to use recursion. How do I do this?
I’ve had trouble writing this code. I’m supposed to make a function that can
Share
I was able to finish it myself thanks to what you guys suggested. I was confused on how to go about the actual average calculation until after reading what you guys posted. If this code can be improved please tell! Thanks!