WAIT! Before you down-vote and/or mark this as a duplicate, please read:
I've reviewed quite a few answers on SO regarding determining if an argument (parameter, variable, etc.) is passed to a function, including this and this.
However, the consensus answer is to check for undefined, one way or another. But that's not necessarily accurate. What if an argument is passed that is itself undefined?
Basically I'm looking to differentiate between:
var a = [1,2][2] // where this will result in undefined
myFunction(a);
vs.
myFunction(); // where no variable whatsoever is passsed.
The answer could simply be that this is impossible and the undefined variable should be caught before being sent the function, but was hoping there was another way.
Here's a JSFiddle where I tried to see if any of the previous suggestions were different between the two above scenarios - with no luck.
If this is truly a duplicate question, please point me in the right direction.