I tried to complete the Daily Challenge where you are required to output the sum of an array as change in cash (“$D.CC“). My code however seems to not be working when I submit my answer.
I have tested the output in my IDE but the console in FreeCodeCamp throws a reference error when I try to console log the function. I believe my solution is adequate but can’t seem to understand why it does not pass the test.
Any thoughts?
I have attached a screenshot of the challenge below.
