Skip to content

Instantly share code, notes, and snippets.

@winkerVSbecks
Created January 11, 2016 17:44
Show Gist options
  • Save winkerVSbecks/97123596c48a4703563f to your computer and use it in GitHub Desktop.
Save winkerVSbecks/97123596c48a4703563f to your computer and use it in GitHub Desktop.
es6-vs-es5
// ES5
SomePromise()
.then(function(result) {
return doSomething(result)
})
.catch(function (err) {
console.log(err.message)
});
// ES6
SomePromise()
.then((result) => doSomething(result))
.catch((err) => console.log(err.message));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment