偽の合体演算子


const height = 0;

console.log(height || 100); // 100
console.log(height ?? 100); // 0
Nullish coalescing operator (?)左側の値がundefined or null読書ありがとう💙
@ codedropに続いてください.毎日のポストのための技術.
● ● Facebook
マイクロラーニング● Web開発● ジャバスクリプト● メルンスタック● ジャバスクリプト
codedrops.tech