-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
项目&代码风格指南 #41
Comments
数组
|
解构赋值
|
函数
|
类
|
Modules
|
const foo = function bar() { ⭕️ 我覺得原義應該是 |
对象
创建对象时多用对象字面量,不用
new
操作符创建对象中有计算属性时,直接用计算属性:
使用对象方法简写,属性简写
在不必要的情况下,不要为对象的属性名添加引号
不要直接调用
Object.prototype
中的方法如hasOwnProperty
,propertyIsEnumerable
和isPrototypeOf
通过对象展开符而不是
Object.assign
来进行浅复制,同时这样也可以显示忽略某些属性来复制其他属性。The text was updated successfully, but these errors were encountered: