Are functions objects or types in Javascript?

后端 未结 3 973
无人及你
无人及你 2021-02-07 05:38

In his Eloquent Javascript, Haverbeke claims that (page 16):

\"In a JavaScript system, most of this data is neatly separated into things called va

3条回答
  •  情深已故
    2021-02-07 06:02

    JavaScript supports functional programming. As a result all JavaScript functions are first-class functions, meaning that functions are treated like ordinary objects.

    http://en.wikipedia.org/wiki/First-class_functions

提交回复
热议问题