To try and figure out what’s going on, I’ve even run typeof on totalSum in my browser (produces “number”), run console.log at every step of the function, and I’m starting to suspect something is going on behind the scenes of the FCC compiler. The code above was copy/pasted from my VS Code window, which as I previously stated is working fine.
In the future, please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.
The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.