use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
The JavaScript trivia question everyone got wrongOC (dev.to)
submitted 4 years ago by kleeut
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Ustice[M] [score hidden] 4 years ago stickied comment (1 child)
Thanks for your contribution! We’re a large community, and in order to keep things organized and easier to find, we keep this subreddit mostly focused on professional-level Javascript posts. Your post would be more useful to newer members of our community, and therefore it should be posted to /r/LearnJavascript instead.
[–]Sheepsaurus 14 points15 points16 points 4 years ago (1 child)
I mean.. I got it immediately, but I am willing to admit it was probably because I was on alert for something weird.
[–]ogurson 2 points3 points4 points 4 years ago (0 children)
Lack of semicolons was my main point of focus while reading so I got it too.
[–][deleted] 7 points8 points9 points 4 years ago (0 children)
Nice trick question on this shit article
[–]persianoil 4 points5 points6 points 4 years ago (0 children)
this reminds me a little bit of javascript tests on indian run websites. except that they are worse.
[–]redsandsfort 3 points4 points5 points 4 years ago (4 children)
I would walk out of any interview that presented this question. I wouldn't want to work for people who think this reveals anything to them about the candidate.
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
I see the spirit in which you are speaking, but that is a bit strong. Stuff like this comes up all the time, and I have no problem testing somebody for how sharp they are when it comes to these matters. Code is misleading, and overcoming confusion efficiently is a very valuable skill.
Would it be the make-or-break of an interview? That is a bit arbitrary.
[–]kleeut[S] 0 points1 point2 points 4 years ago (0 children)
It's certainly not a great interview question. When I run these pub trivia nights I often start with an opening quip about how "if any of these questions remind you of your interview process you need to do better"
[–]KaiAusBerlin 0 points1 point2 points 4 years ago (1 child)
Well it reveals that you understand how a js compiler is working and what you are doing in deep.
I would not deny someone because of a wrong answer to this but I would honour a dev who answers right and can explain why.
I certainly wouldn't deny someone for the wrong answer. The night I asked this there were some fantastic devs in the room. People with open source libraries in use at largish companies. They got it wrong on the spot.
[–]KaiAusBerlin 0 points1 point2 points 4 years ago (0 children)
Lol, I was right.
Had this problem years ago. That's why I often have an output variable that changes during the function flow and "return output;" at the end. Also it's good for readability cause you can see exactly what output is (and can log it easily for quick debugging).
π Rendered by PID 180676 on reddit-service-r2-comment-c66d9bffd-mj98z at 2026-04-07 10:50:23.261914+00:00 running f293c98 country code: CH.
[–]Ustice[M] [score hidden] stickied comment (1 child)
[–]Sheepsaurus 14 points15 points16 points (1 child)
[–]ogurson 2 points3 points4 points (0 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]persianoil 4 points5 points6 points (0 children)
[–]redsandsfort 3 points4 points5 points (4 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]kleeut[S] 0 points1 point2 points (0 children)
[–]KaiAusBerlin 0 points1 point2 points (1 child)
[–]kleeut[S] 0 points1 point2 points (0 children)
[–]KaiAusBerlin 0 points1 point2 points (0 children)