Created
July 25, 2017 13:54
-
-
Save morten-olsen/b6d8f4e95ee5da4a570173d7ad58461b to your computer and use it in GitHub Desktop.
JavaScript style guide
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
| function a() { | |
| return { | |
| }; | |
| }; | |
| console.log(a()); | |
| // ouputs: {} | |
| function b() | |
| { | |
| return | |
| { | |
| }; | |
| }; | |
| console.log(b()); | |
| // outputs: undefined |
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
| (() => { console.log('1') })() | |
| (() => { console.log('2') })() | |
| // outputs: ERROR! | |
| (() => { console.log('1') })(); | |
| (() => { console.log('2') })(); | |
| // outputs: 1, 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment