-
-
Save vmarchesin/72e6cf8a6836ddcf1f06284b1d76164d to your computer and use it in GitHub Desktop.
Javascript Arrow Functions and Closure
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
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