Arguments Optional Challenge - missing a test case?

Arguments Optional Challenge - missing a test case?
0

#1

So I was going back through a couple of my older solutions today in order to make them more readable, more efficient, and able to withstand edge cases not covered my the FCC tests. My solution passed all the FCC test cases originally, but I noticed the following test case was not included

addTogether('abc')(3);

According to the challenge instructions, this should return undefined

When I ran my solution against this test case, I got the following error in the console:

TypeError: addTogether(...) is not a function

Then I went to freeCodeCamp Algorithm Challenge Guide: Arguments Optional to see if any the basic, intermediate, or advanced solutions returned undefined for my test case. It turns out that none of those solutions returned undefined and they all had my error message. In fact, I even tested all the extra reply posts below the guide solutions and all of them resulted in the same error.

Does anyone have a solution for this challenge which passes all the FCC tests plus this extra test case? If you do, please post using the spoiler tags (found in the gear options of the forum editor).


#2

I can’t think of any way both addTogether('abc'); and addTogether('abc')(3); can return undefined. If the first case is undefined, there is no function to call.