Hacker Newsnew | comments | show | ask | jobs | submit login

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 | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: