Coding convention in [removed] use of spaces between parentheses

前端 未结 7 1117
孤城傲影
孤城傲影 2021-02-14 12:54

According to JSHint, a Javascript programmer should not add a space after the first parenthesis and before the last one.

I have seen a lot of good Javascript libraries t

相关标签:
7条回答
  • 2021-02-14 13:59

    There are few if any technical reasons to prefer one over the other - the reasons are almost entirely subjective.

    In my case I would use the second format, simply because:

    1. It's perfectly readable, and follows the vast majority of formatting conventions in Javascript's ancestor languages

    2. JS file download size matters [although minification does of course fix that]

    3. I've always done it that way.

    0 讨论(0)
提交回复
热议问题