Closed Bug 1641112 Opened 5 years ago Closed 5 years ago

There may be a problem with the Chinese translation of variable hoisting

Categories

(developer.mozilla.org :: Security, defect)

All
Other
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: 1743972413, Unassigned)

Details

(Whiteboard: [specification][type:bug])

What did you do?

There may be a problem with the Chinese translation of variable hoisting

What happened?

English original:

In ECMAScript 2015, let and const are hoisted but not initialized. Referencing the variable in the block before the variable declaration results in a ReferenceError, because the variable is in a "temporal dead zone" from the start of the block until the declaration is processed.

But the Chinese translation is

在 ECMAScript 6 中,let(const)将不会提升变量到代码块的顶部。因此,在变量声明之前引用这个变量,将抛出引用错误(ReferenceError)。这个变量将从代码块一开始的时候就处在一个“暂时性死区”,直到这个变量被声明为止。

What this Chinese translation makes me understand is that let and const will not be hoisted

What should have happened?

I think the Chinese translation can be more perfect

Is there anything else we should know?

Two URLs about this issue:

  1. https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Grammar_and_types
  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_Types#Variable_hoisting

Not a security sensitive bug. Removing that flag so that the right people can see it.

Group: websites-security

(In reply to Simon Bennetts [:psiinon] from comment #1)

Not a security sensitive bug. Removing that flag so that the right people can see it.

I'm very sorry about that.But I can't find how to modify the level of this issue now.

Severity: normal → S4

Looking into this some more, I dont think bugzilla is the right place to report such a problem.
https://developer.mozilla.org/ is a wiki that anyone can edit - why not sign in and correct the phrase yourself?
https://developer.mozilla.org/en-US/docs/MDN/Getting_started

I'm very sorry about report this problem in the wrong place. Thank you for your comment

No problem - thanks for getting involved!

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.