Skip to content

Instantly share code, notes, and snippets.

@akabab
Last active March 12, 2018 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save akabab/35a21ef32a96becc1edca166c9f78ab3 to your computer and use it in GitHub Desktop.
Save akabab/35a21ef32a96becc1edca166c9f78ab3 to your computer and use it in GitHub Desktop.
// ES5
function sum (a, b) {
return a + b
}
// which is similar to
var sum = function (a, b) {
return a + b
}
// ES6 - arrow function
const sum = (a, b) => {
return a + b
}
// which can be reduced by
const sum = (a, b) => a + b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment