- 757 名前:デフォルトの名無しさん mailto:sage [2016/06/18(土) 14:18:57.19 ID:qpxG5nAO.net]
- catchをthenの機能に含めて、こういう書き方もできる。
Promise.resolve("sample") .then(text => test1(text)) .then(text => { console.log("test 1 OK:" + text); return text; }, text => { console.log("test 1 NG:" + text); return text; }) .then(text => test2(text)) .then(text => { console.log("test 2 OK:" + text); }, text => { console.log("test 2 NG:" + text); });
|

|