| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx

Promise - 嵌套函数不起作用

0
9683 次浏览

我想知道为什么以下代码不起作用,毕竟它只是嵌套函数:

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))

 

3个答案

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