How to use neither nor in if with TypeScript

1 Answer

0 votes
const a = null;
const b = 0;

if (!(a || b)) { 
  	console.log('neither a nor b');
} else {
  	console.log('else');
}

    
     
     
     
/*
run:
     
"neither a nor b"
     
*/

 



answered Jun 24, 2022 by avibootz
...