扫码关注官方订阅号
const q = () => console.log(2) const w = async () => { console.log(1) await q console.log(3) } w()
为什么q没有输出 1 2 3而是输出 1 3
小伙看你根骨奇佳,潜力无限,来学PHP伐。
低级错误,函数执行应该加上括号 await q();。
await q();
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
低级错误,函数执行应该加上括号
await q();。