-
Notifications
You must be signed in to change notification settings - Fork 559
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
這一段話的意思譯反了,請參考新譯 #360
base: master
Are you sure you want to change the base?
這一段話的意思譯反了,請參考新譯 #360
Conversation
A correction to the zhtw translation. |
length' is a non-enumerable property of an array.
@@ -47,6 +47,12 @@ When `hasOwnProperty` is left out, the code is prone to errors in cases where | |||
the native prototypes - e.g. `Object.prototype` - | |||
have been extended. | |||
|
|||
> Tried in jeforth |
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.
What is jeforth, why is this relevant?
@@ -22,6 +22,7 @@ as objects too. | |||
2..toString(); // the second point is correctly recognized | |||
2 .toString(); // note the space left of the dot | |||
(2).toString(); // 2 is evaluated first | |||
2["toString"](); // alternative notation avoids using the dot |
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.
While this works, I don't think it's necessary
You need to run "npm install" to install dependencies in order to build Javascript Garden. You may need to install npm too. |
原文
While this is often considered to be one of JavaScript's weaknesses, the prototypal inheritance model is in fact more powerful than the classic model. It is, for example, fairly trivial to build a classic model on top of a prototypal model, while the other way around is a far more difficult task.
舊譯
儘管常常有人提及 JavaScript 的缺點,但基於原型的繼承模型比傳統繼承更強大。
實現傳統的類繼承模型是很簡單。但是在 JavaScript 中實現原型的繼承模型則要困難很多。(最後一句話意思反了,而且 javascript 本來就已經實現原型繼承了)
新譯
儘管這常被認為是 JavaScript 的缺點,但「原型繼承模型」其實比「類繼承模型」更強大。在「原型繼承模型」上實現傳統的「類繼承模型」是小事一件,但反過來要在只有「類繼承模型」的地方弄出「原型繼承模型」則要困難很多。