The Phantom Event Argument

not really

it’s more like the difference between

arr.filter(el => Boolean(el));

and

arr.filter(Boolean);

in both cases you are passing a function to the argument. In the first case you are passing a function that call a function and returns it, in the second you are just passing that function directly to the method

in both cases the function Boolean is used by the filter method, they are both valid, in the second case there is a step less

2 Likes