Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d421e02

Browse files
Update article.md
typo
1 parent 9f7235d commit d421e02

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎1-js/04-object-basics/05-object-toprimitive/article.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ There is no control whether `toString()` returns exactly a string, or whether `S
164164
The only mandatory thing: these methods must return a primitive, not an object.
165165

166166
```smart header="Historical notes"
167-
For historical reasons, if `toString` or `valueOf` return an object, there's no error, but such value is ignored (like if the method didn't exist). That's because in ancient times there was no good "error" concept in JavaScript.
167+
For historical reasons, if `toString` or `valueOf` returns an object, there's no error, but such value is ignored (like if the method didn't exist). That's because in ancient times there was no good "error" concept in JavaScript.
168168
169169
In contrast, `Symbol.toPrimitive` *must* return a primitive, otherwise there will be an error.
170170
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /