Last active
March 12, 2018 12:18
-
-
Save akabab/35a21ef32a96becc1edca166c9f78ab3 to your computer and use it in GitHub Desktop.
This file contains 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 characters
// 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