empty array is true or false code example
Example: empty array is true or false
const arr = [1];
if (arr) console.log("[] is truethy");
if (arr == false) console.log("however, [] == false");
const arr = [1];
if (arr) console.log("[] is truethy");
if (arr == false) console.log("however, [] == false");