Created
September 2, 2016 19:33
-
-
Save philpoore/233a73387f5acccc7dea3aa86a2baa2a to your computer and use it in GitHub Desktop.
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 characters
// these are the same | |
// as a function | |
var square = function (a){ | |
return a * a; | |
} | |
// as a lamda function | |
var square = (a) => { | |
return a * a; | |
} | |
// use both like this | |
console.log(square(80)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment