Tell us what’s happening:
Describe your issue in detail here.
Hello , could anyone tell me what’s wrong with my code , i miss the following test ( addTogether("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
should return undefined
.)
thank you in advance.
**Your code so far**
function addTogether() {
let arg=Array.from(arguments)
if(arg.length==1){
return x=>addTogether(arg[0],x)
}
if(arg.some(element=>typeof element!=='number')){
return undefined
}
return arg[0]+arg[1]
}
addTogether(2,3);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Challenge: Arguments Optional
Link to the challenge: