阅读背景:

运行多个variable = function()并知道它们何时完成的最简洁方法是什么

来源:互联网 

I have multiple variables that need calculating before being saved as as JSON file, these are calculated with a function. However when running asynchronously they come up as undefined. I read up on promises and seems like this may be the way, but it seems a bit silly running 15 promises, so I thought I'd ask if there is a cleaner way of doing this. Here's a portion of the code I have multiple variables that need calculating




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: