开发者

Is there a Benefit to Having the Name of Javascript Functions Start with Lowercase Letters?

I have noticed that most Javascript methods (framework and custom) start with lowercase letters. Is there a reason and/开发者_如何学Cor benefit to this?


There's no technical reason. It's about readability, tradition, similarity to existing code. Consistency leads to readability, and arbitrary divergence stands out for no good reason.


In any case-sensitive language, it's especially important to be consistent about how you case variables. But starting with lower-vs-upper is just an idiom that's evolved in the community.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜