Skip to content

Instantly share code, notes, and snippets.

@philpoore
Created September 2, 2016 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philpoore/233a73387f5acccc7dea3aa86a2baa2a to your computer and use it in GitHub Desktop.
Save philpoore/233a73387f5acccc7dea3aa86a2baa2a to your computer and use it in GitHub Desktop.
// 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