Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rarely use ifs?

What do you do if you want to see if, e.g. there are any results for the user's query?

I would do

if (results.length > 0)

or something



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: