Skip to content

Commit 1d7efa8

Browse files
committed
Translate article
Line 219 needs more attention
1 parent 9bae254 commit 1d7efa8

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

1-js/09-classes/06-instanceof/article.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,16 @@ alert( {}.toString.call(new XMLHttpRequest()) ); // [object XMLHttpRequest]
204204
205205
زمانی که می‌خواهیم نوع داده را به عنوان یک رشته دریافت کنیم تا اینکه فقط بررسی کنیم، می‌توانیم به جای `instanceof` از `{}.toString.call` برای شیءهای درون‌ساخت استفاده کنیم.
206206
207-
## Summary
207+
## خلاصه
208208
209-
Let's summarize the type-checking methods that we know:
209+
بیایید متدهای بررسی نوع داده که می‌شناسیم را خلاصه کنیم:
210210
211-
| | works for | returns |
211+
| | کار می‌کند برای | برمی‌گرداند |
212212
|---------------|-------------|---------------|
213-
| `typeof` | primitives | string |
214-
| `{}.toString` | primitives, built-in objects, objects with `Symbol.toStringTag` | string |
215-
| `instanceof` | objects | true/false |
213+
| `typeof` | مقدارهای اصلی | رشته |
214+
| `{}.toString` | مقدارهای اصلی، شیءهای درون‌ساخت، شیءها شامل `Symbol.toStringTag` | رشته |
215+
| `instanceof` | شیءها | true/false |
216216
217-
As we can see, `{}.toString` is technically a "more advanced" `typeof`.
217+
همانطور که می‌بینید، `{}.toString` از لحاظ فنی یک `typeof` «پیشرفته‌تر» است.
218218
219-
And `instanceof` operator really shines when we are working with a class hierarchy and want to check for the class taking into account inheritance.
219+
و زمانی که با سلسله‌ای از کلاس‌ها کار می‌کنیم و می‌خواهیم بررسی کنیم که کلاس در ارث‌بری وجود دارد یا نه، عملگر `instanceof` واقعا می‌درخشد.

0 commit comments

Comments
 (0)