新梦幻诛仙2礼包: Promise - 嵌套函數不起作用

0
12049 次瀏覽

梦幻诛仙手游丹青阁天书 www.rasug.icu 我想知道為什么以下代碼不起作用,畢竟它只是嵌套函數:

var calculus = new Promise((resolve, reject) => (resolve) => resolve(3))

var calculus2 = new Promise((resolve, reject) => {
  () => resolve(4)
})

calculus.then((result) => console.log(result))
calculus2.then((result) => console.log(result))

 

請盡量讓自己的答案能夠對別人有幫助

4個答案

默認排序按投票排序
0
你的分享是我收集的偉大知識,你是我崇拜的重要人物,謝謝你 wings.io
0

Try to find other developer forum/Q&A like github. They will help you. play spades online free

0

Wow! This can be one particular of the most useful blogs We’ love ever arrive across on this subject. Actually Excellent. I am also a specialist in this topic, therefore, I can understand your effort.
geometry dash
 

0

I really like the application you share. It is great and meets my requirements.

geometry dash online

相似問題

相關經驗

相關資訊

相關文檔