Skip to content
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

小修改 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@

## 2空格缩进

使用2个空格而不是 tab 来进行代码缩进,同时绝对不要混用空格和 tab 。
使用2个空格而不是 tab 来进行代码缩进,同时绝对不要混用空格和 tab 。l

Sublime Text 2 设置(perfernces > Settings - User):

```
"tab_size": 2,
"translate_tabs_to_spaces": true
```
不过有些文档编辑器可以设置tab为空格,如果使用java 可是设置table为4个空格,如果是nodejs可以设置为2个空格

## 换行

Expand Down Expand Up @@ -470,7 +471,8 @@ if (isSessionValid) {

## 异步回调函数

Node 的异步回调函数的第一个参数应该是错误指示,只有这样才能够享受许多流程控制模块的福利。
Node 的异步回调函数的第一个参数应该是错误指示,只有这样才能够享受许多流程控制模块的福利。最新的node
已经支持了promise 可以很好的避免 callback hell 问题

*Right:*

Expand Down