为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

喵喔喔 2018-12-18 22:26:14
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行代码的箭头函数连写,它是什么意思?
查看完整描述

1 回答

?
九州编程

TA贡献1785条经验 获得超4个赞

代表返回值就是函数
例如

const a = b => c=> b + c
写成es5 就是 
var a = function(b){    return function(c){        return b + c
    }    
}


查看完整回答
反对 回复 2018-12-18
  • 1 回答
  • 0 关注
  • 669 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号