Hacker News new | past | comments | ask | show | jobs | submit login

I doubt that anyone who hasn't written JS will recognize !! as an idiom for converting to boolean.



That kind of type coercion predates JS.

  perl -e 'print !!"whee"'
  1
  php -r 'print !!"whee";'
  1
  awk 'BEGIN {print !!"whee"}'
  1




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: