Files
freeCodeCamp/guide/chinese/miscellaneous/the-es6-promises/index.md
2018-10-16 21:32:40 +05:30

15 lines
438 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: The Es6 Promises
localeTitle: Es6承诺
---
ES6的一项新功能可帮助实现异步编程。
## 句法
```
new Promise(executor);
new Promise(function(resolve, reject) { ... });
```
![MDN图片](//discourse-user-assets.s3.amazonaws.com/original/2X/8/803d67f7e823e9e50b55debaa82bb661543d2ddc.png)
在[MDN上](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)阅读更多内容