Skip to content

Commit 598e161

Browse files
authored
smth
1 parent ee13ccb commit 598e161

File tree

1 file changed

+1
-1
lines changed
  • 1-js/04-object-basics/09-object-toprimitive

1 file changed

+1
-1
lines changed

1-js/04-object-basics/09-object-toprimitive/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ alert(obj + 2); // 22 ("2" + 2), преобразование к примити
266266

267267
Алгоритм преобразования таков:
268268

269-
1. Сначала вызывается метод `obj[Symbol.toPrimitive](hint)`, если он существует.
269+
1. Сначала вызывается метод `obj[Symbol.toPrimitive](hint)`, если он существует,
270270
2. В случае, если хинт равен `"string"`
271271
- происходит попытка вызвать `obj.toString()` и `obj.valueOf()`, смотря что есть.
272272
3. Иначе, если хинт равен `"number"` или `"default"`

0 commit comments

Comments
 (0)