Downside to abusing await as return statement?

后端 未结 0 1891
猫巷女王i
猫巷女王i 2021-02-08 13:35

I\'ve stumbled upon an interesting but rather hacked way to write linear code with promises in Javascript, as follows:

const return_by_death = new Promise((resolv         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题