Allowing javascript function to accept any number of arguments

后端 未结 6 1805
难免孤独
难免孤独 2020-12-29 05:28

I would like the below function to be more flexible and accept multiple callbacks to other functions if they are defined in the arguments.

$(function() {
            


        
6条回答
  •  再見小時候
    2020-12-29 06:15

    Just loop over the arguments object: https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope/Arguments

提交回复
热议问题