@@ -33,7 +33,8 @@ Incrementing and decrementing
33
33
34
34
## Operations on Numbers & Strings
35
35
36
- In JavaScript, numbers and strings will occasionally behave in ways you might not expect.
36
+ In JavaScript, numbers and strings will occasionally behave in ways you might
37
+ not expect.
37
38
38
39
<div class =" example " markdown =" 1 " >
39
40
Addition vs. concatenation
@@ -53,7 +54,6 @@ Forcing a string to act as a number
53
54
console.log(foo + Number(bar));
54
55
</div >
55
56
56
-
57
57
The Number constructor, when called as a function (like above) will have the
58
58
effect of casting its argument into a number. You could also use the unary plus
59
59
operator, which does the same thing:
@@ -65,7 +65,8 @@ console.log(foo + +bar);
65
65
66
66
## Logical Operators
67
67
68
- Logical operators allow you to evaluate a series of operands using AND and OR operations.
68
+ Logical operators allow you to evaluate a series of operands using AND and OR
69
+ operations.
69
70
70
71
<div class =" example " markdown =" 1 " >
71
72
Logical AND and OR operators
@@ -82,13 +83,13 @@ Logical AND and OR operators
82
83
baz && foo; // returns 1, which is true
83
84
</div >
84
85
85
- Though it may not be clear from the example, the || operator returns the value
86
+ Though it may not be clear from the example, the ` || ` operator returns the value
86
87
of the first truthy operand, or, in cases where neither operand is truthy,
87
- it'll return the last of both operands . The && operator returns the value of
88
+ it'll return the last operand . The ` && ` operator returns the value of
88
89
the first false operand, or the value of the last operand if both operands are
89
90
truthy.
90
91
91
- Be sure to consult the section called “Truthy and Falsy Things” for more
92
+ Be sure to see the section called “Truthy and Falsy Things” for more
92
93
details on which values evaluate to true and which evaluate to false.
93
94
94
95
<div class =" note " >
0 commit comments