Update article.md

Fix some quotes for consistency with above paragraphs
This commit is contained in:
Vaibhav Soni 2020-12-03 18:51:18 +00:00 committed by GitHub
parent 634e066841
commit 3d86152fdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,7 @@ Here, operators work one after another. The first `+` sums two numbers, so it re
```js run
alert('1' + 2 + 2); // "122" and not "14"
```
Here, the first operand is a string, the compiler treats the other two operands as strings too. The `2` gets concatenated to `'1'`, so it's like `'1' + 2 = '12'` and `'12' + 2 = '122'`.
Here, the first operand is a string, the compiler treats the other two operands as strings too. The `2` gets concatenated to `'1'`, so it's like `'1' + 2 = "12"` and `"12" + 2 = "122"`.
The binary `+` is the only operator that supports strings in such a way. Other arithmetic operators work only with numbers and always convert their operands to numbers.