Javascript const分配了函数声明

时间:2017-05-18 12:37:44

标签: javascript ecmascript-6

在对某些npm包进行代码审查时,我注意到了这种模式:

const start = function start() {
   ...code
}

我想知道这种模式对什么有用。有人知道吗?

以这种方式分配const不会很好:

const start = function() { ... code }

0 个答案:

没有答案
相关问题