Skip to content

Commit 7c3bca8

Browse files
authored
Merge pull request #1106 from K-Sato1995/patch-11
Better punctuations
2 parents 287c8e9 + 37799fb commit 7c3bca8

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
What happens when objects are added `obj1 + obj2`, subtracted `obj1 - obj2` or printed using `alert(obj)`?
55

6-
In that case objects are auto-converted to primitives, and then the operation is carried out.
6+
In that case, objects are auto-converted to primitives, and then the operation is carried out.
77

88
In the chapter <info:type-conversions> we've seen the rules for numeric, string and boolean conversions of primitives. But we left a gap for objects. Now, as we know about methods and symbols it becomes possible to fill it.
99

@@ -138,7 +138,7 @@ alert(+user); // valueOf -> 1000
138138
alert(user + 500); // valueOf -> 1500
139139
```
140140

141-
Often we want a single "catch-all" place to handle all primitive conversions. In this case we can implement `toString` only, like this:
141+
Often we want a single "catch-all" place to handle all primitive conversions. In this case, we can implement `toString` only, like this:
142142

143143
```js run
144144
let user = {

0 commit comments

Comments
 (0)