How to tell if arr is array or arguments

In the challenge “Sorted Union” it looked like an array to me but actually they were arguments. For example I didnt know why I couldn’t access arr[1] then I had to look at the hint and saw they mentioned arguments. How do I know when it is a “real” array and when it is…idk…the results of a function that LOOK like an array but the values cant be accessed with normal array syntax?
I hope someone understands my question lol :slight_smile:

arr is an array, but that is also just the first argument

the function in Sorted Union challenge receive any number of arguments, if you have only one parameter than only the first argument is accessible with that parameter

Ok I think I get it, looking back at my earlier exercises I see some patterns. Let me work through the rest of the intermediate algorithm exercises and hopefully I wont make the same mistake hehe :slight_smile:
Also thanks so much for replying the fCC team is the BEST


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.