| ▲ | stephenr 10 hours ago | |||||||||||||||||||||||||
As usual, he's copying someone else who's been doing this for years: https://www.npmjs.com/package/is-number - and then look and see shit like is odd, is even (yes two separate packages because who can possibly remember how to get/compare the negated value of a boolean??) Honestly for how much attention JavaScript has gotten in the last 15 years it's ridiculous how shit it's type system really is. The only type related "improvement" was adding the class keyword because apparently the same people who don't understand "% 2" also don't understand prototypal inheritance. | ||||||||||||||||||||||||||
| ▲ | zahlman 9 hours ago | parent [-] | |||||||||||||||||||||||||
To be fair, prototypal inheritance is relatively uncommon language design. I'd rank it as considerably harder to understand than the % operator. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||