Promise - 嵌套函数不起作用

0
38044 次浏览

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

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

 

请尽量让自己的答案能够对别人有帮助

32个答案

默认排序 按投票排序
0

I thought I am the only one who experience this nested function error or bug. Cedar Rapids certified electrician offers an affordable but quality service for all your electric repair and installation needs

0

只能为惨淡的生活增添悲情的一笔。要记住:没有哪片天永远都下雨,没有哪个人一直都低潮。任何的困苦
彩票  福彩双色球  幸运飞艇

0

Your article is very useful, the content is great, I have read a lot of articles, but for your article, it left me a deep impression, thank you for sharing. happy wheels

0

Discover a roofer Close to you in Independence, Iowa.Go within the best level of our elite organized work. Get a cite for roof repair or substitution from one of our material temporary workers.

0

Studied genuine audits and see evaluations for Laredo, TX Power Washers for complimentary! This list will assist you choose the correct professional Pressure Washing Benefit in Laredo, TX.

0

Good post. I agree with the author's sharp point word unscrambler

0

I really like reading through a post that can make people think. Also, many thanks for permitting me to comment! run 3

0

Do you check the keys yet? These keys are very delicate. You have to look slotxo carefully. Check carefully that you write correctly and completely or not. You are wrong size space. It will not be able to display your code. Try to check

0

Nice code! Glad I found the solution here! Thanks for sharing. towing Vienna VA

0

Interesting equation! Thanks for sharing this site! shed builder Springfield VA

0

Interesting posts for you I have pondered about this issue and therefore need to post it. Really cool post, really satisfying and useful post. Thank you. For a good post like this >> เกม

0

This page has been read and captured very well. The more reading, the more knowledge gained It will be great if you follow slot our page.

 

0

Great site! Promising web design

0

Amazing idea! Thanks for sharing this solution and this valuable site. bathroom remodel ideas

0

Great site! Thanks for this equation and solution! towing Arlington VA

0

I have learned a lot of information from your sharing, thanks a lot. Please continue sharing such interesting information. club penguin

0

I have some good information. I can help solve the problem for you.ดาวน์โหลด slotxo

0

This is a great thing, I think everyone feels this information is very valuable, thank you happy wheels

0

Thank you for your post. I have read through some similar topics! However, your article gave me a very special impression, unlike other articles. I hope you continue to have valuable posts like this or more to share with everyone! driving directions

1 2