标签:OLE main mis func map return sync cti function
function main () { return Promise.all([1,2,3,4].map((value) => asyncThing(value))) } function asyncThing(n) { console.log(n); return n; } main() .then(values => values.map((value) => value * 2)) .then(v => console.log(v)) .catch(err => console.error(err))
标签:OLE main mis func map return sync cti function
原文地址:https://www.cnblogs.com/jpit/p/9010918.html