Why use named function expressions?

后端 未结 5 1657
忘了有多久
忘了有多久 2020-11-22 01:33

We have two different way for doing function expression in JavaScript:

Named function expression (NFE):

var boo = function boo () {         


        
5条回答
  •  清歌不尽
    2020-11-22 02:35

    Using named function expressions is better, when you want to be able to reference the function in question without having to rely on deprecated features such as arguments.callee.

提交回复
热议问题