3 ms·
This isn't a javascript problem. They were trying to be too clever and test whether a value was set in the same statement where that value was used for a compar
by RandomInteger4 9y ago
This isn't a javascript problem. They were trying to be too clever and test whether a value was set in the same statement where that value was used for a comparison.
The non-truthiness of 0 is something present in many languages.
- paulgb 9y agoIt's not specific to JavaScript (I've made the same bug in python), but it should be a sign that a language designed to make websites interactive fulfills different requirements than a language designed for building real money trading systems.
- RandomInteger4 9y agoMaybe, or maybe people just need to be less clever with their code?