Skip to content

Instantly share code, notes, and snippets.

@kurtroberts kurtroberts/index.js
Last active Jul 6, 2018

Embed
What would you like to do?
Semicolon insertion
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
You can’t perform that action at this time.