3 ms·
Boolean operators returning values is common, especially in dynamically typed languages. The code is valid in JavaScript, for example, and in Python (except it
by l_t 8y ago
Boolean operators returning values is common, especially in dynamically typed languages. The code is valid in JavaScript, for example, and in Python (except it uses "or" instead of "||").
- user5994461 8y agoIn python, it should probably be corrected with // or 1.0 to make it either an integer division or a float division.
- l_t 8y agoAh, that's true. Good point.