gpt4 book ai didi

javascript - ES6 双箭头参数(即 const update = x => y => { } )

转载 作者:数据小太阳 更新时间:2023-10-29 04:57:55 24 4
gpt4 key购买 nike

<分区>

下面代码中的双箭头参数是什么意思?

const update = x => y => {
// Do something with x and y
}

与下面的相比有何不同?

const update = (x, y) => {
// Do something with x and y
}

谢谢!

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com