Tell us what’s happening:
What am i doing wrong here?
Your code so far
function addTogether(a, b) {
if (a === parseInt(a) && b === parseInt(b)) {
return a + b;
}
else if (b == undefined) {
return function sumtwoAnd(c) {
return a + c;
}
}
sumtwoAnd(5);
}
addTogether(2,3);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional