while facing an interview i got confused between 1. if({}) console.log("hello") 2. if([]) console.log("hello") 3. if(' ') console.log("hello") 4. if('') console.log("hello")
I know that first three will print hello , but i don't know on what basis evaluation is done. And even i'll like to know about few sites or URL from where I can get these tricky questions and solutions
Aucun commentaire:
Enregistrer un commentaire