Created
February 28, 2017 04:11
-
-
Save itzsaga/2b56d1211f0f5ba2e2e6009a1fa3218f to your computer and use it in GitHub Desktop.
Basic arrow function example
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
| var regularFunction = function() { | |
| console.log('I was called!') | |
| } | |
| var arrowFunction = () => { | |
| console.log('I was called, too!') | |
| } | |
| regularFunction() // 'I was called!' | |
| arrowFunction() // 'I was called, too!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment