There may be a problem with the Chinese translation of variable hoisting
Categories
(developer.mozilla.org :: Security, defect)
Tracking
(Not tracked)
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:
Comment 1•5 years ago
|
||
Not a security sensitive bug. Removing that flag so that the right people can see it.
| Reporter | ||
Comment 2•5 years ago
|
||
(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.
Comment 3•5 years ago
|
||
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
| Reporter | ||
Comment 4•5 years ago
|
||
I'm very sorry about report this problem in the wrong place. Thank you for your comment
Comment 5•5 years ago
|
||
No problem - thanks for getting involved!
Description
•