How to use short if in Node.js

1 Answer

0 votes
const n = 78;
 
const s =  n > 3 ? ">3" : "<=3";
 
console.log(s)
 
 
 
/*
run:
 
>3 
 
*/

 



answered Apr 11, 2022 by avibootz
...