Let's say I'm trying to push multiple calls like:
var fields = [1,2]; fields.push(test("#test1", 1)); fields.push(test("#test2", 2)); fields.push(test("#test3", 3)); fields.push(newTest("#test5", 3, 'something')); function test(a, b){ // something here } function newTest(a, b, c){ // something here } Is there an efficient way to do this all in one call? Like:
fields.push(test({"#test1": 1, "#test2": 2, "#test3": 3}), newTest(3, 4, "something")); or
fields.push(test(["#test1": 1, "#test2": 2, "#test3": 3]), newTest(3, 4, "something"));