I don’t recall the challenge (it’s been some time), but if your question is about the .filter function and its callback, most array functions like this will take a callback function who will receive an element from the array as parameter.
So if arr = [1,2,3,4], then arr.filter() will loop over this array and function(arg){} will become function(1){}, then function(2){}, then function (3){} and finally function(4){}.
For filter you can then use this argument to make a boolean expression.
…which will return true for all even numbers and false for odd ones. allEvens will become an array of all the even numbers our of arr.
In your own example above, newArray.indexOf(arg) === -1 will return true if arg (any element from your original array) was found in newArray. So your filter will filter out all those elements that exist in both the old and the new array.
The main point - what I was looking for - I now understand to be that “function (arg)” is iterations of the array with which we are using filter() - in this case, “arr”.
I do understand the rest of the logic, but was stuck on what “arg” consisted of. Thank for you the other example as well.