How to check if variable is null or undefined in Node.js

1 Answer

0 votes
const variable = undefined;

console.log(variable == null); // null == undefined
  
  
  
  
/*
run:
  
true
  
*/

 



answered Jun 27, 2022 by avibootz
...