Last active
July 6, 2018 19:35
-
-
Save kurtroberts/5f2d4e140ba55e7d38ce691dc13e1a41 to your computer and use it in GitHub Desktop.
Semicolon insertion
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
var x = 0 | |
/*** | |
While this comment seems like it might be the | |
beginning of a new statement, you should be careful what | |
your believe. ;) You should always check */+2/* or *+3* times | |
what the code is doing and what someone is explaining | |
in the comments. Sometimes crazy code likes to hide | |
inside really big comments. | |
Automatic semicolon insertion is great, until it isn't. | |
Also leaving off semicolons makes your code look unfinished. | |
I'll put up with your stupid */+2/* space tab indenting. But | |
please, stop trying to turn javascript into ruby. | |
***/ | |
console.log(x) | |
// >>> 4 | |
var x = 0; | |
/*** | |
While this comment seems like it might be the | |
beginning of a new statement, you should be careful what | |
your believe. ;) You should always check */+2/* or *+3* times | |
what the code is doing and what someone is explaining | |
in the comments. Sometimes crazy code likes to hide | |
inside really big comments. | |
Automatic semicolon insertion is great, until it isn't. | |
Also leaving off semicolons makes your code look unfinished. | |
I'll put up with your stupid */+2/* space tab indenting. But | |
please, stop trying to turn javascript into ruby. | |
***/ | |
console.log(x) | |
// >>> 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment