I have been looking around for a while, and cant seem to find the answer for this. I do not know if it is possible, but am just curious.
Suppose I have a simple function:
function foo(name){alert(name);}
Also suppose that I have to invoke this function several times with several different names:
foo("bar"); foo("blahh"); foo("myName"); foo("yourName");
Is there a shorthand for this?
For Example:foo("bar":"blahh":"myName":"yourName");
This example is trivial, but in practice that principal could be very useful. If there is some kind of jQuery solution I am open to that as well.
As a generalization of other answers:
this will add the
sequencemethod to all functions. So you can use it with any function: