Last active
November 26, 2017 12:26
-
-
Save nikkaroraa/b11ee951b9a4f931a8b0862eef486a3a to your computer and use it in GitHub Desktop.
Implicit Return (Fat-Arrow)
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
| //Old syntax | |
| var name = function returnName (id) { | |
| return editors[id].name; | |
| } | |
| //Fat-Arrow syntax | |
| var name = id => editors[id].name; //implicit return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment