Skip to content

Commit ed18402

Browse files
committed
Translate "Task"
1 parent 7f88d45 commit ed18402

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Yeah, looks strange indeed.
1+
Да, действительно выглядит странно.
22

3-
But `instanceof` does not care about the function, but rather about its `prototype`, that it matches against the prototype chain.
3+
Но `instanceof` не учитывает саму функцию, напротив -- только `prototype`, который оператор проверяет на совпадения в прототипной цепочке.
44

5-
And here `a.__proto__ == B.prototype`, so `instanceof` returns `true`.
5+
И в данном примере `a.__proto__ == B.prototype`, так что `instanceof` возвращает `true`.
66

7-
So, by the logic of `instanceof`, the `prototype` actually defines the type, not the constructor function.
7+
Таким образом, по логике `instanceof`, `prototype` в действительности определяет тип, а не функция-конструктор.

1-js/09-classes/06-instanceof/1-strange-instanceof/task.md

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

33
---
44

5-
# Strange instanceof
5+
# Странный instanceof
66

7-
Why `instanceof` below returns `true`? We can easily see that `a` is not created by `B()`.
7+
Почему `instanceof` внизу возвращает `true`? Мы можем легко увидеть, что `a` не создан с помощью `B()`.
88

99
```js run
1010
function A() {}

0 commit comments

Comments
 (0)