Skip to content

Instantly share code, notes, and snippets.

@vmarchesin
Created September 11, 2018 20:35
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 vmarchesin/72e6cf8a6836ddcf1f06284b1d76164d to your computer and use it in GitHub Desktop.
Save vmarchesin/72e6cf8a6836ddcf1f06284b1d76164d to your computer and use it in GitHub Desktop.
Javascript Arrow Functions and Closure
function sayHello() {
console.log('Hello')
}
sayHello() // 'Hello'
// You can assign the Arrow Function to a variable
let sayHello = () => {
console.log('Hello')
}
sayHello() // 'Hello'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment