Allowing javascript function to accept any number of arguments

后端 未结 6 1798
难免孤独
难免孤独 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 05:59

    In more recent times you can now make use or the spread and rest operators as detailed here - Pass unknown number of arguments into javascript function

提交回复
热议问题