Fix old link and excess line break in 1.2.8
This commit is contained in:
parent
e074a5f825
commit
8e7e13d6a1
2 changed files with 2 additions and 3 deletions
|
@ -9,8 +9,7 @@ let b = "2"; // prompt("Second number?", 2);
|
||||||
alert(a + b); // 12
|
alert(a + b); // 12
|
||||||
```
|
```
|
||||||
|
|
||||||
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or
|
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or prepending them with `+`.
|
||||||
prepending them with `+`.
|
|
||||||
|
|
||||||
For example, right before `prompt`:
|
For example, right before `prompt`:
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ Parentheses override any precedence, so if we're not satisfied with the default
|
||||||
|
|
||||||
There are many operators in JavaScript. Every operator has a corresponding precedence number. The one with the larger number executes first. If the precedence is the same, the execution order is from left to right.
|
There are many operators in JavaScript. Every operator has a corresponding precedence number. The one with the larger number executes first. If the precedence is the same, the execution order is from left to right.
|
||||||
|
|
||||||
Here's an extract from the [precedence table](https://developer.mozilla.org/en/JavaScript/Reference/operators/operator_precedence) (you don't need to remember this, but note that unary operators are higher than corresponding binary ones):
|
Here's an extract from the [precedence table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence) (you don't need to remember this, but note that unary operators are higher than corresponding binary ones):
|
||||||
|
|
||||||
| Precedence | Name | Sign |
|
| Precedence | Name | Sign |
|
||||||
|------------|------|------|
|
|------------|------|------|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue