-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nullish coalescing演算子(`??`)とOptional chaining(`?.`)に関する変更 ## 変更点 - [x] **falsy**の説明を演算子の章に移動 - falsyの対応としてnullishを演算子の章で解説するため - BigIntの `0n` も falsy に追加 #445 - [x] Optional chaining演算子の(`?.`)の解説を"オブジェクト"の章に追加 - [x] Nullish coalescing演算子(`??`)とOptional chaining(`?.`)の組み合わせを説明 - [x] Nullish coalescing演算子(`??`)の解説を"演算子"の章に追加 - [x] 一部のコードを `||` を `??` に置き換え - 例としては問題ないけど、`??` 推奨気味に変更 ## 追加しなかったこと - デフォルト値に対するNullish coalescing演算子(`??`)とOptional chaining(`?.`)の組み合わせのパターン - 他にもいろいろな書き方があるため含めないようにした - 関数呼び出しとOptional chaining演算子(`?.`) - `window.fn?.()` みたいなケース - ユースケースがイマイチ。別の解決方法でも良いと思える気がする fix #1178 fix #1179
- Loading branch information
Showing
10 changed files
with
491 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ if文の`条件式`には`true`または`false`といった真偽値以外の値 | |
- `undefined` | ||
- `null` | ||
- `0` | ||
- `0n` | ||
- `NaN` | ||
- `""`(空文字列) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.