Coding convention in [removed] use of spaces between parentheses

前端 未结 7 1157
孤城傲影
孤城傲影 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条回答
  •  Happy的楠姐
    2021-02-14 13:52

    Quoting Code Conventions for the JavaScript Programming Language:

    All binary operators except . (period) and ( (left parenthesis) and [ (left bracket) should be separated from their operands by a space.

    and:

    There should be no space between the name of a function and the ( (left parenthesis) of its parameter list.

提交回复
热议问题