Skip to content

Commit d269126

Browse files
committed
typo
1 parent 7da4376 commit d269126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/05-data-types/04-array/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ alert( [1] + 1 ); // "11"
421421
alert( [1,2] + 1 ); // "1,21"
422422
```
423423

424-
Arrays do not have `Symbol.toPrimitive`, neither a viable `valueOf`, they implement only `toString` conversion, so here `[]` becomes an empty string, `[1]` becomes `"1"` and `[1,2]` becomes `"1,2".
424+
Arrays do not have `Symbol.toPrimitive`, neither a viable `valueOf`, they implement only `toString` conversion, so here `[]` becomes an empty string, `[1]` becomes `"1"` and `[1,2]` becomes `"1,2"`.
425425

426426
When the binary plus `"+"` operator adds something to a string, it converts it to a string as well, so the next step looks like this:
427427

0 commit comments

Comments
 (0)