7
coookie
8y

My company wants me to add semicolon in my JS code. I now have to change 191 lines. Why would you want the goddamn ;
😭

Comments
  • 3
    This formatter has an option to insert semicolons: http://jsutility.pjoneil.net/
  • 3
    @ChappIO saved 1 life today
  • 2
    @coookie Gotta make up for that ranting time huh? ;)
  • 0
    @vinerz why is that?
  • 1
    I used to like being explicit with semicolons in JavaScript, but I learned way more about what actually makes up a JavaScript statement by leveraging ASI. Plus now my JS looks gorgeous
  • 0
    as someone who's always explicitly used semicolons, what are the consequences of leaving them out? I know in a few specific cases they're still needed, but, does the interpreter automatically add them in? does that have any performance implications?
  • 1
    @AdamGaskins The interpreter does add missing semicolons when necessary but since it only affects the parsing of the code the only impact on performance you'd have will be on startup time and that too will be negligible.
  • 1
    @AdamGaskins also, if you're transpiling your code like for front-end, minification will add in the semicolons for you
  • 8
    why wouldn't you want me?

    :D jk
  • 1
    @semicolon did not see that coming😆
  • 2
    "use strict"; says hi.
  • 1
    @semicolon I miss you sometimes
Add Comment