Callback function - use of parentheses

后端 未结 4 1889
滥情空心
滥情空心 2020-12-03 08:21

I\'m new to jQuery and am bit confused about the use (or not) of parentheses with a callback function. Say I have a function:

function cb() {
 // do somethin         


        
4条回答
  •  鱼传尺愫
    2020-12-03 08:46

    cb() means give me the result of executing the function cb.

    cb IS the function cb or, more accurately a pointer (reference) to it.

提交回复
热议问题