Is the following function legal and portable?
function(_, _, x){
return x;
}
Sometimes I want to write a callback that doesn't use the leftmost parameters so I wonder what is the most concise way to do so.
Conclusion:
function(_1, _2, x) is probably as short as it gets then.
function(notUsed1,notUsed2,x)- or name the parameters for what they actually are and simply not use them. More readable, and you don't have to worry about it breaking in some obscure browser (or in strict mode of the popular browsers as per Šime's answer).