Tell us what’s happening:
The starter code is:
function sym(args){
return args
}
sym([1,2,3], [5,2,1,4])
I’m not sure how to access the second array(or subsequent arrays, for that matter), if there is only one argument in the function declaration. When I console.log args.length, the response is ‘3’. How do I access the properties of other elements?
It seems like a relatively easy problem, so I’m sure I’m overlooking something simple, or making it harder than it really is.
**Your code so far**
function sym(args) {
return args;
}
sym([1, 2, 3], [5, 2, 1, 4]);
**Your browser information:**
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Challenge: Algorithms - Find the Symmetric Difference
Link to the challenge: