How are input parameters filled in javascript method chains?

后端 未结 4 1598
终归单人心
终归单人心 2020-11-28 11:50

I am trying to really understand the details of how javascript works. During method chaining, sometimes one method returns to another method that has a named input parameter

4条回答
  •  悲&欢浪女
    2020-11-28 12:08

    in d3 the d3.select("body") will return something {search_element:document.body,selectAll:function,...} so with the dot notation you call the previous object's available function. It maybe just returns the class itself. So all the methods are available in whatever order with the next dot. But in ajax done, some functions have to be called so they fill the object's important parameters the done function uses.

提交回复
热议问题