Created
May 23, 2018 13:47
-
-
Save mkczarkowski/7e7e90d7011d040ee87737c1d4badeaa to your computer and use it in GitHub Desktop.
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
| // OK, brak bloku pozwala na wykorzystanie niejawnego return. | |
| const sum = (a, b) => a + b; | |
| // :(, każde wywołanie zwróci undefined, wewnątrz bloków wymagane jest jawne return. | |
| const sum = (a, b) => { a + b } | |
| // OK, jawne return. | |
| const sum = (a, b) => { return a + b }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment