JavaScript/Promise:修订间差异
来自康健生活
| 第13行: | 第13行: | ||
Object.prototype.toString.call(Promise.resolve())</syntaxhighlight>|{{consoleout|<pre>"[object Promise]" | Object.prototype.toString.call(Promise.resolve())</syntaxhighlight>|{{consoleout|<pre>"[object Promise]" | ||
</pre>}}}} | </pre>}}}} | ||
== Promise.all == | |||
<syntaxhighlight lang="javascript"> | |||
# iterable 一个可迭代对象,如 Array 或 String。 | |||
Promise.all(iterable);</syntaxhighlight> | |||
=== 参考 === | |||
* [https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise/all Promise.all()] | |||