Skip to content

Commit bc37461

Browse files
committed
Translate article
1 parent 2abceba commit bc37461

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

1-js/09-classes/05-extend-natives/article.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,22 @@ alert(filteredArr.isEmpty()); // Error: filteredArr.isEmpty is not a function
6868
مجموعه‌های دیگر، مثال `Map` و `Set`، همینطور کار می‌کنند. آن‌ها هم از `Symbol.species` استفاده می‌کنند.
6969
```
7070

71-
## No static inheritance in built-ins
71+
## ارث‌بری ایستا در درون‌ساخت‌ها وجود ندارد
7272

73-
Built-in objects have their own static methods, for instance `Object.keys`, `Array.isArray` etc.
73+
شیءهای درون‌ساخت متدهای ایستا خود را دارند، برای مثال `Object.keys`، `Array.isArray` و غیره.
7474

75-
As we already know, native classes extend each other. For instance, `Array` extends `Object`.
75+
همانطور که از قبل می‌دانیم، کلاس‌های نیتیو یکدیگر را تعمیم می‌دهند. برای مثال `Array` کلاس `Object` را تعمیم می‌دهد.
7676

77-
Normally, when one class extends another, both static and non-static methods are inherited. That was thoroughly explained in the article [](info:static-properties-methods#statics-and-inheritance).
77+
طبیعاتا، زمانی که کلاسی کلاس دیگر را تعمیم می‌دهد، هم متدهای ایستا و هم متدهای غیر ایستا به ارث برده می‌شوند. این موضوع به طور کامل در مقاله [](info:static-properties-methods#statics-and-inheritance) توضیح داده شد.
7878

79-
But built-in classes are an exception. They don't inherit statics from each other.
79+
اما کلاس‌های درون‌ساخت استثنا هستند. آن‌ها ویژگی‌های ایستا را از یکدیگر به ارث نمی‌برند.
8080

81-
For example, both `Array` and `Date` inherit from `Object`, so their instances have methods from `Object.prototype`. But `Array.[[Prototype]]` does not reference `Object`, so there's no, for instance, `Array.keys()` (or `Date.keys()`) static method.
81+
برای مثال، هر دو کلاس `Array` و `Date` از `Object` ارث‌بری می‌کنند، پس نمونه‌های آن‌ها از `Object.prototype` متدهایی دارند. اما `Array.[[Prototype]]` به `Object` رجوع نمی‌کند پس برای مثال، مندهای ایستای `Array.keys()` (یا `Date.keys()`) وجود ندارند.
8282

83-
Here's the picture structure for `Date` and `Object`:
83+
اینجا ساختاری تصویری برای `Date` و `Object` داریم:
8484

8585
![](object-date-inheritance.svg)
8686

87-
As you can see, there's no link between `Date` and `Object`. They are independent, only `Date.prototype` inherits from `Object.prototype`.
87+
همانطور که می‌بینید، بین `Date` و `Object` هیچ ارتباطی وجود ندارد. آن‌ها مستقل هستند، فقط `Date.prototype` از `Object.prototype` ارث‌بری می‌کند.
8888

89-
That's an important difference of inheritance between built-in objects compared to what we get with `extends`.
89+
این یک تفاوت مهم شیءهای درون‌ساخت در مقایسه با چیزی است که از `extends` بدست می‌آوریم است.

0 commit comments

Comments
 (0)