I am currently working on a JavaScript exercise in FreeCodeCamp, and one of the test cases that my code should work with is a function call that looks like this:
addTogether(2)(3);
here is the bare-bones function:
function addTogether() {
return;
}
When I ran the code below:
function addTogether() {
return arguments;
}
In the console that the editor provides, I get:
TypeError: addTogether (...) is not a function
The instructions indicate the use of the object arguments, and it works well with function calls of the test case, which have only one argument object (i.e. addTogether(2, 3);), but not the one I showed above.
Is there a way to access / use individual argument objects when they are in the format I showed above?
. - , .
, .