Hacker News new | ask | show | jobs
by nijiko 4389 days ago
if (array && !array.length) { /* do something here */ }

Check existence as well, this also works for a jQuery selection.