jeudi 7 février 2019

Difference in if statement selector

I don't understand the difference between this condition:

if ($("div")) { /* code */ }

and

if ($("div").length) { /* code */ }

What's the difference?

Aucun commentaire:

Enregistrer un commentaire