Nullish Coalescing

Is there a way to implement or apply nullish-coalescing for undeclared variables?

let a;
a ?? 'Text' // Returns 'text'

//Expected
b ?? 'Text' //Should Return 'text' 

18 thoughts on “Nullish Coalescing”

Leave a Comment