When should I use ?? (nullish coalescing) vs || (logical OR)?
Related to Is there a "null coalescing" operator in JavaScript? - JavaScript now has a ?? operator which I see in use more frequently. Previously most JavaScript code used ||.
let userAge = null
// These values will be the same.
let age1 = userAge || 21
let age2 = userAge ?? 21
In what circumstances will ?? and || behave differently?