Tell us what’s happening:
It appears to me that my function is returning the expected output. However, it is still failing. I would be very grateful if someone could put a second set of eyes on this for me and let me know where I’ve gone wrong. Thank you!!!
I’m very confused why you have a function declared inside of your chunkArrayInGroups function, but regardless of that chunkArrayInGroups doesn’t return anything.
The reason why I have a function declared inside the larger function is I couldn’t get a for loop to iterate for some reason in this exercise. I ended up just using a while loop and got it working. Thanks for the direction.
Congratulations on working through a tough problem. I’m glad you were able to figure it out. I agree that a while loop is a cleaner way to solve this problem.