Promise - 嵌套函数不起作用
0
我想知道为什么以下代码不起作用,毕竟它只是嵌套函数:
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))