awaiting a value from a async function with setTimeOut and Promise

后端 未结 0 1001
花落未央
花落未央 2020-11-21 22:04

So I have this famous function from the documentation.

function resolveAfter2Seconds(x) {
  return new Promise(resolve => {
    setTimeout(() => {
              


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