Skip to content

Commit

Permalink
add a new example of promise 👻
Browse files Browse the repository at this point in the history
  • Loading branch information
ccforward committed Aug 16, 2016
1 parent dad0dcb commit 4f48a41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Blog/34.ES6 笔记三-Promise.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ES6 笔记三 - Promise

一个稍微复杂点的例子***[https://github.com/ccforward/cc/blob/master/promise/example-new.js](https://github.com/ccforward/cc/blob/master/promise/example-new.js)***

***ES6规范确认以前,写过一个Promise的[简单实现](https://github.com/ccforward/cc/tree/master/promise)***

Promise就是一个容器,里面保存着某个未来才会结束的事件(一个异步操作)的结果。作为一个对象,从Promise可以获取异步操作的消息。
Expand Down
1 change: 1 addition & 0 deletions promise/example-new.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 这是基于ES6的 Promise 完成的例子
var Fn = {
a: function(aid){
return new Promise(function(resolve, reject){
Expand Down

0 comments on commit 4f48a41

Please sign in to comment.