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

Python does foo if bar else baz, which is a little more verbose but still okay. JS and Perl, however, rock with their boolean operators AND and OR not just evaluating to true and false, but to the actual value that was considered true.

Python does that as well:

  0 or False or 'Python rocks' or [] == 'Python rocks'



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

Search: