Should I put a Semicolon (;) when I use onclick=“”

后端 未结 4 1272
深忆病人
深忆病人 2020-12-14 16:00

Should I put a Semicolon (;) when I use onclick=\"\"?

Click

or:

4条回答
  •  暖寄归人
    2020-12-14 16:16

    I prefer a semicolon. I know it is optional (as it is many times in JS), but I like to be uniform and it helps to alert the person that the statement is complete.

提交回复
热议问题