Fix typo line 49 (#23511)
This commit is contained in:
@ -46,7 +46,7 @@ if (![]) // <-- falsy, will also NOT run code in if-block
|
|||||||
|
|
||||||
## Caveat
|
## Caveat
|
||||||
|
|
||||||
Be aware of the data type when evaluating a value in a Boolean context. If the data type of the value is meant to be a _number_, the truthy/falsy evalution can result in an unexpected outcome:
|
Be aware of the data type when evaluating a value in a Boolean context. If the data type of the value is meant to be a _number_, the truthy/falsy evaluation can result in an unexpected outcome:
|
||||||
```javascript
|
```javascript
|
||||||
const match = { teamA: 0, teamB: 1 }
|
const match = { teamA: 0, teamB: 1 }
|
||||||
if (match.teamA)
|
if (match.teamA)
|
||||||
|
Reference in New Issue
Block a user