📅  最后修改于: 2022-03-11 14:57:57.298000             🧑  作者: Mango
const a = null;
const b = 3;
a ??= b;
console.log(a); // returns 3
// the above statement is equivalent to
if (a === null || a === undefined) {
a = b;
}