Arguments Optional: Code works on Atom, but not on FCC

when I run this code on Atom, I get the correct answers in all cases. When I run it on FCC, the second test fails: AddTogether(2) (3).

Can you help?

function addTogether() {
  //console.log("args length=", args.length);
  if (args.length>2) {
    return undefined;
  for (i=0;i<args.length;i++) {
    //console.log("for loop");
    if (typeof args[i] == "string") {
      return undefined;
    } else {
      //return console.log( "didn't work",(args[i] != args[i]));
  if (typeof args[0]=="string") {
  //  console.log("Single argument is not a number");
    return undefined;
  if (args.length==2) {
    return args[0] + args[1];
  } else {
    console.log("right place");
    return function(y) {
      var sumTwoAnd= args[0]+y;

//  return false;

addTogether(2) (3);

I think you have a missing return statement. You weren’t returning sumTwoAnd (you were simply printing it to the console).

thanks. that was certainly part of it. also, I did not have an adequate check for the second parameter as [3] was not coming back as undefined.

thanks again.