Skip to content

Commit e734f51

Browse files
committed
reloacated truthy to be a part of JavaScript premier
1 parent 9ad1af3 commit e734f51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [this](docs/javascript/this.md)
1010
* [Closure](docs/javascript/closure.md)
1111
* [Number](docs/javascript/number.md)
12+
* [Truthy](docs/tips/truthy.md)
1213
* [Future JavaScript Now](docs/future-javascript.md)
1314
* [Classes](docs/classes.md)
1415
* [Classes Emit](docs/classes-emit.md)
@@ -93,7 +94,6 @@
9394
* [static constructors](docs/tips/staticConstructor.md)
9495
* [singleton pattern](docs/tips/singleton.md)
9596
* [Function parameters](docs/tips/functionParameters.md)
96-
* [Truthy](docs/tips/truthy.md)
9797
* [Build Toggles](docs/tips/build-toggles.md)
9898
* [Barrel](docs/tips/barrel.md)
9999
* [Create Arrays](docs/tips/create-arrays.md)

docs/tips/truthy.md docs/javascript/truthy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Quite commonly it helps to be explicit that the intent is to treat the value as
3030

3131
It is common to use this pattern in lots of places e.g.
3232

33-
```ts
33+
```js
3434
// Direct variables
3535
const hasName = !!name;
3636

@@ -39,6 +39,6 @@ const someObj = {
3939
hasName: !!name
4040
}
4141

42-
// e.g. ReactJS
42+
// e.g. in ReactJS JSX
4343
{!!someName && <div>{someName}</div>}
4444
```

0 commit comments

Comments
 (0)