The callback function I'm working with has the following signature (from http://api.jquery.com/load/):
complete(responseText, textStatus, XMLHttpRequest)
Now, I only need the third parameter. In Lua there's a convention where an underscore is used to skip unneeded return values from functions (skip because _ will actually hold the value):
var1, _, _, var4 = func()
So I thought of doing a similar thing with JavaScript and set my function signature to this:
function (_, _, XMLHttpRequest)
Is there anything wrong with this approach, perhaps there's a better/cleaner way?
See Question&Answers more detail:os