gpt4 book ai didi

javascript - 是否可以使用 "return"语句从 JavaScript 立即调用的箭头函数中获取值?

转载 作者:行者123 更新时间:2023-12-03 16:28:12 25 4
gpt4 key购买 nike

<分区>

在此代码示例中:

let result = (async (global) => {
// other code here (includes await's; thus the async)
return 123;
})(this);

代码有效,但找不到返回值(不在 result 中)。有什么方法可以使用普通的 return 语句从这个函数中获取数据吗?

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