Argument optional

Tell us what’s happening:

return function section didn't pass test i need to know mistakes in code..

think your for your help

Your code so far

function addTogether() {
 var args=[...arguments]

 for(var i in args){
  return undefined

  return args.reduce((a,b)=>a+b)

else if(args.lengh=1){

    return function (num) {
return undefined;
return args+num





Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; rv:81.0) Gecko/20100101 Firefox/81.0.

Challenge: Arguments Optional

Link to the challenge:

1 Like

Start with spelling errors - arguments.lengh is not the same as arguments.length.