3 ms·
We got here because JS got really good at abstractions, but people have no interest in long term maintenance. Using is-odd is fine, the same as developers usin
by 8note 4y ago
We got here because JS got really good at abstractions, but people have no interest in long term maintenance.
Using is-odd is fine, the same as developers using the "+" is fine in languages that support it. Where JS is weird is in not having a full standard library along with very arbitrary data, leading to folks seeing that they use the is-odd functionality regularly enough to where it's useful to have a dedicated operator
I'd use an is-odd library if I need to figure out if something is odd across 20 different data types depending on how somebody inputted data in a UI