DEV Community

Asad Anik
Asad Anik

Posted on

Nullis Operator In JavaScript

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);
Enter fullscreen mode Exit fullscreen mode

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)