javascript箭头函数连写是什么意思?

javascript箭头函数连写是什么意思?一直不太理解,请大佬说详细一点,代码如下:

let CURRENT = 'NULL';const renderAuthorize = Authorized => currentAuthority => {  //这一行的箭头函数连写是什么意思?
  if (currentAuthority) {    if (typeof currentAuthority === 'function') {
      CURRENT = currentAuthority();
    }    if (      Object.prototype.toString.call(currentAuthority) === '[object String]' ||      Array.isArray(currentAuthority)
    ) {
      CURRENT = currentAuthority;
    }
  } else {
    CURRENT = 'NULL';
  }  return Authorized;
};export { CURRENT };export default Authorized => renderAuthorize(Authorized);

问题就是第2行代码的箭头函数连写,它是什么意思?


喵喔喔
浏览 670回答 1
1回答

九州编程

代表返回值就是函数例如const a = b => c=> b + c 写成es5 就是  var a = function(b){    return function(c){        return b + c     }     }
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript