Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
321 views
in Technique[技术] by (71.8m points)

javascript - JavaScript命名约定(JavaScript naming conventions [closed])

I know there is a lot of controversy (maybe not controversy, but arguments at least) about which naming convention is the best for JavaScript.

(我知道关于哪种命名约定最适合JavaScript的争论很多(也许不是争论,至少是争论)。)

How do you name your variables, functions, objects and such?

(您如何命名变量,函数,对象等?)

I'll leave my own thoughts on this out, as I haven't been doing JS for long (couple of years, only), and I just got a request to create a document with naming conventions to be used in our projects at work.

(我将对此保留自己的想法,因为我已经很长时间(仅几年)都没有使用JS,而我只是收到了一个创建带有命名约定的文档的请求,该文档将在我们的工作项目中使用。)

So I've been looking (google-ing) around, and there are so many different opinions.

(因此,我一直在寻找(google-ing),有很多不同的意见。)

The books I've read on JS also use different naming conventions themselves, but they all agree on one bit: “Find what suits you, and stick to it.” But now that I've read so much around, I found that I like some of the other methods a bit better than what I'm used to now.

(我在JS上阅读过的书本身也使用了不同的命名约定,但是它们都在一个方面达成了共识:“找到适合您的内容,并坚持下去。”但是,由于我已经阅读了很多东西,所以我发现像其他方法一样,比我现在习惯的要好一些。)

  ask by peirix translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...