@@ -168,13 +168,13 @@ A triple equals sign (===) is used to compare two values (see Equality Operators
168
168
How does this work in practice?
169
169
170
170
``` js
171
- 1 == 1 // true
172
- 7 == ' 7' // true
173
- 1 != 2 // true
174
- 5 === 5 // true
175
- 9 === ' 9' // false
176
- 3 !== 3 // true
177
- 3 !== ' 3' // true
171
+ 1 == 1 // -> true
172
+ 7 == ' 7' // -> true
173
+ 1 != 2 // -> true
174
+ 5 === 5 // -> true
175
+ 9 === ' 9' // -> false
176
+ 3 !== 3 // -> true
177
+ 3 !== ' 3' // -> true
178
178
```
179
179
180
180
> why does ` 7 == '7' ` returns true and ` 9 === '9' ` returns false?
@@ -186,10 +186,10 @@ How does this work in practice?
186
186
* Less than or equal operator ` <= `
187
187
188
188
``` js
189
- 4 > 3 // returns true
190
- 3 >= 3 // returns true
191
- 13 < 12 // returns false
192
- 3 <= 4 // returns true
189
+ 4 > 3 // -> true
190
+ 3 >= 3 // -> true
191
+ 13 < 12 // -> false
192
+ 3 <= 4 // -> true
193
193
```
194
194
195
195
More about [ comparison operators] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators )
@@ -204,11 +204,11 @@ More about [comparison operators](https://developer.mozilla.org/en-US/docs/Web/J
204
204
<br >Returns the remainder left over after you've shared the left number out into a number of integer portions equal to the right number.
205
205
206
206
``` js
207
- 8 + 9 // returns 17, adds two numbers together.
208
- 20 - 12 // returns 8, subtracts the right number from the left.
209
- 3 * 4 // returns 12, multiplies two numbers together.
210
- 10 / 5 // return 2, divides the left number by the right.
211
- 8 % 3 // returns 2, as three goes into 8 twice, leaving 2 left over.
207
+ 8 + 9 // -> 17, adds two numbers together.
208
+ 20 - 12 // -> 8, subtracts the right number from the left.
209
+ 3 * 4 // -> 12, multiplies two numbers together.
210
+ 10 / 5 // -> 2, divides the left number by the right.
211
+ 8 % 3 // / -> 2, as three goes into 8 twice, leaving 2 left over.
212
212
```
213
213
214
214
More about [ Arithmetic_Operators] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#.25_.28Modulus.29 )
@@ -221,9 +221,9 @@ More about [Arithmetic_Operators](https://developer.mozilla.org/en-US/docs/Web/J
221
221
222
222
Given that x = 6 and y = 3
223
223
``` js
224
- x < 10 && y > 1 // returns true
225
- x == 5 || y == 5 // returns false
226
- x !== y // returns true
224
+ x < 10 && y > 1 // -> true
225
+ x == 5 || y == 5 // -> false
226
+ x !== y // -> true
227
227
```
228
228
229
229
More about [ logical operators] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators )
0 commit comments