You Can't JavaScript Under Pressure
81–90 of 110 posts
Re: You Can't JavaScript Under Pressure
#82Fun distraction. For me it was: 30% figuring out the answer, 20% not having my editor shortcuts available, 50% figuring out how to check if a value is a certain type. Am I the only one that gives their functions preconditions that the input is good? To me, throwing up when you're passed a non-number to a sum method is correct behavior.
TIL there is no typeof === 'array'. -_-
[] instanceof Array; // returns trueRe: You Can't JavaScript Under Pressure
#83Re: You Can't JavaScript Under Pressure
#84The sudden music/talking that started was annoying and caused me to close the tab immediately.
No NoScript?
Re: You Can't JavaScript Under Pressure
#85Earlier quoted context omitted.
I love how you're mocking HN and the parent post at the same time!
I'm actually not mocking either the post or HN. If I am being a little snarky, it is towards the thin skinned who zero in on any comment they don't like and then launch a tirade in hopes of, essentially, group bullying. It happens with increasing regularity.
Re: You Can't JavaScript Under Pressure
#86Re: You Can't JavaScript Under Pressure
#87I got 11 minutes and 14 seconds. Is that slow? The answer to my last solution was like this: function arraySum(i) { var total = 0 for(var x=0; x
You must've total+= arraySum(i[x]) right? Otherwise this couldn't work as the result of a deep dive wouldn't be utilized anywhere...
Re: You Can't JavaScript Under Pressure
#88What's everyone's times? I did 7 minutes
Re: You Can't JavaScript Under Pressure
#89there's a truly dubious test case in the File Extension test. file called .htaccess is not filename "" and extension "htaccess" with a "." separating the two. .htaccess is a unix style dotfile. its whole name is ".htaccess" and it has no file extension.
Re: You Can't JavaScript Under Pressure
#90Earlier quoted context omitted.
No NoScript?
Maybe I'm naive but... I suspect that the rest of the page wouldn't have worked with NoScript. Since you're, you know, typing in JavaScript code and running it against some test cases.
- usvsthem is white-listed so Javascript runs, which is all that's strictly required.
- White-listed sites are still blocked from running plugins including . It's straightforward to override this on a plugin-by-plugin basis but I typically don't want to.
11:14. The 14 seconds were enough for the first two questions, but I find strings and array handling tough when switching languages.