JSFiddle - React, Tailwind, and code Playground
JavaScript
var x;
var undefined = 'hello';
// both these checks will work
if (x === void 0) {
console.log('x is undefined!');
}
// or
if (x == void 0) {
console.log('x is undefined or null!');
}