Skip to content

Commit f53fed5

Browse files
committed
Translate solution of "search-algorithm"
1 parent bc7b06d commit f53fed5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • 1-js/08-prototypes/01-prototype-inheritance/2-search-algorithm

1-js/08-prototypes/01-prototype-inheritance/2-search-algorithm/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
1. Let's add `__proto__`:
2+
1. بیایید `__proto__` را اضافه کنیم:
33

44
```js run
55
let head = {
@@ -27,6 +27,6 @@
2727
alert( table.money ); // undefined
2828
```
2929

30-
2. In modern engines, performance-wise, there's no difference whether we take a property from an object or its prototype. They remember where the property was found and reuse it in the next request.
30+
2. در موتورهای مدرن، که از لحاظ عملکرد هوشمند هستند، تفاوتی بین اینکه ما ویژگی‌ای را از شیء یا پروتوتایپ آن دریافت کنیم وجود ندارد. آن‌ها جایی که ویژگی پیدا شد را به خاطر می‌سپارند و در درخواست بعدی از آن استفاده می‌کنند.
3131

32-
For instance, for `pockets.glasses` they remember where they found `glasses` (in `head`), and next time will search right there. They are also smart enough to update internal caches if something changes, so that optimization is safe.
32+
برای مثال، برای `pockets.glasses` آن‌ها جایی که `glasses` را پیدا کردند (درون `head`) را به خاطر می‌سپارند و دفعه بعدی دقیقا همانجا را جست و جو می‌کند. همچنین آن‌ها به اندازه‌ای هوشمند هستند که اگر چیزی تغییر کند، کش‌های داخلی را بروزرسانی کنند تا بهینه‌سازی ایمن باشد.

0 commit comments

Comments
 (0)