Do you really know JavaScript?
31–40 of 73 posts
Re: Do you really know JavaScript?
#32I really wouldn't draw any larger conclusions about Javascript from these examples or from the results of this test. These are edge cases. every language has them No sane programmer would put anything like these examples in a normal program, and knowing these edge cases doesn't really help you solve problems or get things done. Because you just won't encounter them in real life.
Re: Do you really know JavaScript?
#33I really wouldn't draw any larger conclusions about Javascript from these examples or from the results of this test. These are edge cases. every language has them No sane programmer would put anything like these examples in a normal program, and knowing these edge cases doesn't really help you solve problems or get things done. Because you just won't encounter them in real life.
Re: Do you really know JavaScript?
#34Wow, i thought i was really good at javascript. I tried 7 questions at random and got 6 of them wrong. /me sad face
Re: Do you really know JavaScript?
#35Holy fuckaroni JavaScript is a mess of a language. I did terrible on this test.
Re: Do you really know JavaScript?
#36Earlier quoted context omitted.
I wouldn't say that. The really nasty bugs come exactly from examples like these. This can save you hours at some point, I had to find some of them the hard way.
typeof is broken. instanceOf is broken. precision arithmetic on floats is broken var hoisting and function scope is a misfeature It's more useful to know those facts than to know the exact result of them in individual contexts well enough to answer a multiple choice question. It's more useful, if you see these examples in real life, to just rewrite them from scratch to not use the broken parts of javascript. Javascri…
I don't think there is other language that comes close to javascript. Ok it's everywhere now, you make a lot of money with it, that's what we have now, but you and others defending it make my ears bleed.
Re: Do you really know JavaScript?
#37I really wouldn't draw any larger conclusions about Javascript from these examples or from the results of this test. These are edge cases. every language has them No sane programmer would put anything like these examples in a normal program, and knowing these edge cases doesn't really help you solve problems or get things done. Because you just won't encounter them in real life.
Yes, but what other common language besides PHP has so many ridiculous edge cases? None I use.
Re: Do you really know JavaScript?
#38I really wouldn't draw any larger conclusions about Javascript from these examples or from the results of this test. These are edge cases. every language has them No sane programmer would put anything like these examples in a normal program, and knowing these edge cases doesn't really help you solve problems or get things done. Because you just won't encounter them in real life.
I disagree, several of these issues can come in up innocent programs written by less-seasoned practitioners. For example, [] not ==ing [] seems like it would be an incredibly common noob mistake. Some of the auto-conversion rules make certain classes of true bugs difficult to find. And I could see someone from a more 'traditional' OOP background getting bitten by "string" != new String("string") != String("string). I…
Re: Do you really know JavaScript?
#39I may be alone in this camp, but I'd actually recommend people read the ES5 spec if they want to be confident in their JS. It's one of the most readable and understandable specifications I've read, and (compared to behemoths like C++) is fairly short. There's even an internally-hyperlinked version at http://es5.github.io .