Nullis Operator
When it got Null Or Undefined Data Type, Then this should return false and never executes the value. Whenever it will get All Falsely values also that not restricts anyone.
const iAmAStudent = false;
const isValid = iAmAStudent ?? 'Okay'
console.log(isValid);
This will return you ‘Okay’ because there is only restriction for Null & Undefined value. And all over the truly and falsely value is actually not restriction for this.
Top comments (0)