23 ms·
At least as far as I'm concerned, the biggest wart of all is variables that are global by default. That just makes no sense at all...
by entropy_ 10y ago
At least as far as I'm concerned, the biggest wart of all is variables that are global by default. That just makes no sense at all...
- whostolemyhat 10y agoBut this was fixed with strict mode; this is like criticising Java for not having generics, even though generics were added ages ago. You can still assign/use global variables in the browser, but like the parent says, this is the browser's fault - having to accept old and badly-written code for compatibility reasons.
- kbenson 10y agoMy biggest problem with JavaScript is that I never can seem to wrap my head around the multiple null/undefined type of values and how to correctly test for them, as well as type introspection. Or, more appropriately, my problem with JavaScript is that it makes that confusing, and I use it just infrequently enough that I forget what I learned last time regarding that. Of course, that's not entirely JavaScript's fault, it just doesn't make it very easy.
- erikpukinskis 10y agoI don't really use null at all. I either just check falsiness, or if there's some chance of the variable being a 0 I check for typeof == "undefined".
- woah 10y agoI think the majority of complaints about JavaScript are from people who are forced to use it infrequently, and don't quite remember how to use it.