freeCodeCamp/guide/english/miscellaneous/the-es6-promises/index.md

14 lines
443 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: The Es6 Promises
---
A new feature of ES6 to help with async programming.
## syntax
new Promise(executor);
new Promise(function(resolve, reject) { ... });
![MDN image](//discourse-user-assets.s3.amazonaws.com/original/2X/8/803d67f7e823e9e50b55debaa82bb661543d2ddc.png)
read more at <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise' target='_blank' rel='nofollow'>MDN</a>