DEV Community

Discussion on: JavaScript Quiz

 
caseywebb profile image
Casey Webb • Edited

I can't think of any case where those would be falsy. What exactly did you experiment with that made it appear that way?

Sanity check...

node -e "if (({})) console.log('truthy')" // requires wrapper to not interpret as block
node -e "if ([]) console.log('truthy')"

Logs truthy twice