azu / promises-book

JavaScript Promiseの本

Home Page:https://azu.github.io/promises-book/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ch2: anAsyncCall -> aBadAsyncCall

azu opened this issue · comments

commented

URL : http://azu.github.io/promises-book/#then-return-new-promise

function anAsyncCall() {
    var promise = Promise.resolve();
    promise.then(function() {
        // 何かの処理
        return newVar;
    });
    return promise;
}

名前がかぶってるので、aBadAsyncCall みたいに名前を変更する。