3 ms·
I always use semicolons in js because I usually compress the code down by removing superflous whitespace -- which would make this style of code not function at
by nostromo 16y ago
I always use semicolons in js because I usually compress the code down by removing superflous whitespace -- which would make this style of code not function at all.
- mncaudill 16y agoThe major compressors are syntax aware. When they compress your JS, they'll put in semicolons where needed.
- suninwinter 16y agoA newline takes up just as many bytes as a semicolon.
- pjscott 16y agoUnless you're using CR+LF as your newline delimiter.
- masklinn 16y agoBut if you have a newline you generally have an indent. Furthermore, there are places in JS where semicolons are absent and newlines are not (after braces).
- pjscott 16y agoIt's moot, anyway. Format your code for readability, and let a minifier handle making it smaller. Then let gzip finish the job.