Skip to content

Commit bc7b06d

Browse files
committed
Translate task of "search-algorithm"
1 parent b41001c commit bc7b06d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 5
22

33
---
44

5-
# Searching algorithm
5+
# الگوریتم جست و جو
66

7-
The task has two parts.
7+
این تمرین دو بخش دارد.
88

9-
Given the following objects:
9+
شیءهای زیر داده شده‌اند:
1010

1111
```js
1212
let head = {
@@ -27,5 +27,5 @@ let pockets = {
2727
};
2828
```
2929

30-
1. Use `__proto__` to assign prototypes in a way that any property lookup will follow the path: `pockets` -> `bed` -> `table` -> `head`. For instance, `pockets.pen` should be `3` (found in `table`), and `bed.glasses` should be `1` (found in `head`).
31-
2. Answer the question: is it faster to get `glasses` as `pockets.glasses` or `head.glasses`? Benchmark if needed.
30+
1. از `__proto__` برای مقداردهی پروتوتایپ‌ها استفاده کنید به طوری که جست و جوی هر ویژگی این مسیر را دنبال کند: `pockets` -> `bed` -> `table` -> `head`. برای مثال، `pockets.pen` باید `3` باشد (در `table` پیدا شد) و `bed.glasses` باید `1` باشد (در `head` پیدا شد).
31+
2. این سوال را جواب دهید: دریافت `glasses` به صورت `pockets.glasses` سریع‌تر است یا `head.glasses`؟ اگر نیاز بود بنچمارک انجام دهید.

0 commit comments

Comments
 (0)