JavaScript รองรับ Nullish Coalescing Operator (??) และเดิมๆ ใช้ Logical OR (||) ตัวอย่างโค้ด (ใช้ ||) var fullName = null; console.log(The full name is= + fullName); var actualName = fullName || David Miller; console.log(The full name is= + actualName); ตัวอย่างโค้ด (ใช้ ?? - ES2020) var fullName