Live data from Hacker News

Do you really know JavaScript?

javascript-puzzlers.herokuapp.com

71–73 of 73 posts

Re: Do you really know JavaScript?

#71

Earlier quoted context omitted.

Yes, but what other common language besides PHP has so many ridiculous edge cases? None I use.

Ruby has about as many. So does C, and C++, which each have much more, with the extra twist that C and C++'s edge cases are wildly different depending on which compiler you use and which platform, and this is labelled a "feature". and Python. And Perl of course. Bash. I bet you could make a similar quiz for Java too.

If anything varies between compilers in C/C++ then you're using undefined behavior. Not the language's fault. The edge cases of these languages are less jarring then Javascript's and make more sense.

Re: Do you really know JavaScript?

#72
post #44
post #22

Earlier quoted context omitted.

I create fully fledged JS apps on a big scale, the difference from this test to reality is startling. The difference is I enforce the use of the closure compiler in our team so 99% of these issues are caught by the compiler. end of story. this test is bullshit.

What exactly do you mean by "fully fledged JS apps on a big scale"? When it comes to more traditional languages like C, C++ and Java, "fully fledged" and "big scale" are descriptors usually reserved for multi-million line systems consistently worked on by 50+ full-time developers at a time. I'm very suspicious of such terminology being applied to JavaScript applications. We generally see a much, much smaller scale wh…

i mean teams of 20-25 people, working with millions of lines of code over all the modules, that has to be regressed the whole time. Big for the tech stack it is. This is not counting our bucketloads of java and scala code as well.

Re: Do you really know JavaScript?

#73
post #55

Yes, but I don't know the answers to these questions because I know to avoid code like this.

Sure, some of these examples are pretty academic (eg ` Array.isArray( Array.prototype )`). But can you truthfully say you never get bitten by basic JS arithmetic fails, given how many ways it's possible to accidentally coerce numbers to strings?

Years ago, perhaps. Can't remember a specific instance.
Post reply on HN