偽の合体演算子
532 ワード
const height = 0;
console.log(height || 100); // 100
console.log(height ?? 100); // 0
Nullish coalescing operator
(?)左側の値がundefined
or null
読書ありがとう💙@ codedropに続いてください.毎日のポストのための技術.
マイクロラーニング● Web開発● ジャバスクリプト● メルンスタック● ジャバスクリプト
codedrops.tech
Reference
この問題について(偽の合体演算子), 我々は、より多くの情報をここで見つけました https://dev.to/ml318097/nullish-coalescing-operator-4hppテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol