-
Notifications
You must be signed in to change notification settings - Fork 5k
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
重新审视 undefined 和 null #8138
Conversation
认领翻译 |
认领校对 |
1 similar comment
认领校对 |
@MoonBall @felixliao 欢迎校对~ |
There was a problem hiding this 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`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 任何原始值都拥有它的初始值,例如 `int` 整型对应 `0`。 | |
* 任何基本类型都拥有它的初始值,例如 `int` 整型对应 `0`。 |
assert.equal(myFunc(), undefined); | ||
``` | ||
|
||
If a function has a `return` statement without an argument, the function implicitly returns `undefined`: | ||
如果一个函数拥有一个 `return` 语句但没有任何附属语句,那么也是默认返回 `undefined`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果一个函数拥有一个 `return` 语句但没有任何附属语句,那么也是默认返回 `undefined`: | |
如果一个函数拥有一个 `return` 语句但没有任何附属语句,那么也会默认返回 `undefined`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PassionPenguin @lsvih 校对完毕
|
||
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`。它指示了一个变量当前并没有指向任何对象 —— 例如,某个变量还没有初始化的时候。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,以下都应该改下
Co-authored-by: Xiaofei Liao <[email protected]> Co-authored-by: Gang Chen <[email protected]>
Co-authored-by: Xiaofei Liao <[email protected]>
@lsvih @felixliao @MoonBall 修改完啦~ |
@PassionPenguin 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。 掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件。 |
PS:代码缩进没问题可以不用改的 |
ide formatter markdown 的行为... |
收到 |
译文翻译完成,resolve #8122