Comments (1)
变量命名
标准变量采用驼峰式命名(除了对象的属性外,主要是考虑到cgi返回的数据)
'ID'在变量名中全大写
'URL'在变量名中全大写
'Android'在变量名中大写第一个字母
'iOS'在变量名中小写第一个,大写后两个字母
常量全大写,用下划线连接
构造函数,大写第一个字母
jquery对象必须以'$'开头命名在团队规范文档中提到的
标准变量采用驼峰式命名(除了对象的属性外,主要是考虑到cgi返回的数据)
,想知道什么是cgi
?既然对象的属性不以驼峰的形式命名,那么是以什么方式命名?
1.通用网关接口(Common Gateway Interface/CGI)2.参考文档中所说,猜测是跟cgi返回的数据命名一致,不然一个变量前端一个命名,返回的数据又一个命名很乱
from codeguide.
Related Issues (20)
- 对上下文this的引用为什么不推荐用me
- 有一个地方不解.
- 请教一下 HOT 1
- 存在例外:[HTML语法]在属性上,使用双引号,不要使用单引号; HOT 1
- 中文文档,建议规范中文语法:区分的、地
- 项目,文件命名一般都是中划线
- 请问,规范页index是怎么打包成一个完整项目的,多谢!
- 请问js这段具体什么问题
- 目前不是都是space缩进2个空格吗,怎么又成soft tab了? HOT 1
- javascript 中关于空行的规范
- http://alloyteam.github.io 已经无法访问 HOT 1
- 旅游
- css部分意见
- 关于 CSS 规范之属性声明顺序,好久没更新了
- VSCode使用比例如此之大,可以整个VSCode的配置吗 HOT 1
- JS生成标签
- 关于代码规范中-属性简写规范
- HTML 属性顺序 HOT 1
- 在webstorm上有更新的想法吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeguide.