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

重新审视 undefined 和 null #8138

Merged
merged 4 commits into from
Mar 6, 2021
Merged

重新审视 undefined 和 null #8138

merged 4 commits into from
Mar 6, 2021

Conversation

PassionPenguin
Copy link
Contributor

译文翻译完成,resolve #8122

@MoonBall
Copy link
Contributor

MoonBall commented Mar 4, 2021

认领翻译

@MoonBall
Copy link
Contributor

MoonBall commented Mar 4, 2021

认领校对

1 similar comment
@felixliao
Copy link
Contributor

认领校对

@lsvih
Copy link
Member

lsvih commented Mar 5, 2021

@MoonBall @felixliao 欢迎校对~

Copy link
Contributor

@felixliao felixliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

校对完一遍,也许还需要一遍

* Variables with object types are initialized with `null`.
* Each primitive type has its own initialization value. For example, `int` variables are initialized with `0`.
* 以对象值为类型的变量初始化为 `null`
* 任何原始值都拥有它的初始值,例如 `int` 整型对应 `0`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 任何原始值都拥有它的初始值,例如 `int` 整型对应 `0`
* 任何基本类型都拥有它的初始值,例如 `int` 整型对应 `0`

article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
assert.equal(myFunc(), undefined);
```

If a function has a `return` statement without an argument, the function implicitly returns `undefined`:
如果一个函数拥有一个 `return` 语句但没有任何附属语句,那么也是默认返回 `undefined`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
如果一个函数拥有一个 `return` 语句但没有任何附属语句,那么也是默认返回 `undefined`
如果一个函数拥有一个 `return` 语句但没有任何附属语句,那么也会默认返回 `undefined`

article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
Copy link
Contributor

@felixliao felixliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PassionPenguin @lsvih 校对完毕

article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved

Many programming languages have one “non-value” called null. It indicates that a variable does not currently point to an object – for example, when it hasn’t been initialized yet.
很多的编程语言都有一种表示非值的类型,叫做 `null`。它指示了一个变量当前并没有指向任何对象 —— 例如,某个变量还没有初始化的时候。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,以下都应该改下

article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
article/2021/undefined-null-revisited.md Outdated Show resolved Hide resolved
PassionPenguin and others added 2 commits March 6, 2021 11:05
Co-authored-by: Xiaofei Liao <[email protected]>
Co-authored-by: Gang Chen <[email protected]>
Co-authored-by: Xiaofei Liao <[email protected]>
@PassionPenguin
Copy link
Contributor Author

@lsvih @felixliao @MoonBall 修改完啦~

@lsvih lsvih merged commit 6413882 into xitu:master Mar 6, 2021
@lsvih
Copy link
Member

lsvih commented Mar 6, 2021

@PassionPenguin 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。

掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件
专栏地址:https://zhuanlan.zhihu.com/juejinfanyi

@lsvih
Copy link
Member

lsvih commented Mar 6, 2021

PS:代码缩进没问题可以不用改的

@PassionPenguin
Copy link
Contributor Author

PassionPenguin commented Mar 6, 2021

PS:代码缩进没问题可以不用改的

ide formatter markdown 的行为...

@PassionPenguin PassionPenguin deleted the translation/undefined-null-revisited branch March 6, 2021 13:00
@PassionPenguin
Copy link
Contributor Author

PassionPenguin commented Mar 6, 2021

已经发布啦@lsvih @MoonBall @felixliao

https://juejin.cn/post/6936559478909665316/

@lsvih
Copy link
Member

lsvih commented Mar 7, 2021

收到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

重新审视 undefined 和 null
4 participants