Created
June 3, 2016 13:09
-
-
Save anonymous/39d6209649c8354e970f1b9405f5d3b7 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <script id="jsbin-javascript"> 'use strict'; var promiseOne = Promise.reject(); var promiseTwo = promiseOne.then(function () { console.log('then'); }); newPromise = promiseTwo['catch'](function () { console.log('catch'); }); promiseTwo.then(function () { console.log('itt legyel!'); })['catch'](function () { console.log('ide nem, ugye?'); }); </script> <script id="jsbin-source-javascript" type="text/javascript">const promiseOne = Promise.reject(); const promiseTwo = promiseOne.then(() => { console.log('then'); }); newPromise = promiseTwo.catch( () => { console.log('catch'); }) promiseTwo.then( () => { console.log('itt legyel!'); }).catch( () => { console.log('ide nem, ugye?'); })</script></body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ 'use strict'; var promiseOne = Promise.reject(); var promiseTwo = promiseOne.then(function () { console.log('then'); }); newPromise = promiseTwo['catch'](function () { console.log('catch'); }); promiseTwo.then(function () { console.log('itt legyel!'); })['catch'](function () { console.log('ide nem, ugye?'); });