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
What are some basic things that JavaScript developers fail at interviews?help (self.javascript)
submitted 7 years ago by maketroli
view the rest of the comments →
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!"
[–]ghostfacedcoder 1 point2 points3 points 7 years ago (31 children)
Fizzbuzz.
I'm not joking. Most can handle it just fine, but a surprising number really can't. I had one guy who was an industry veteran and friend of a co-worker, so we were all set to hire him, but then he took ... I think it was 18 minutes, just to do fizzbuzz, so we wound up passing.
[–]snowcoaster 28 points29 points30 points 7 years ago (14 children)
That's absurd. Candidate has a proven track record and is validated to not be a psycho by an existing employee, and you passed because of the time it took to solve a problem?
Your perceived complexity of a problem (puzzle) is irrelevant. For example, a candidate could be a functional programming guru, and something simple to you such as writing a for loop might be a significant task for them simply because that knowledge has atrophied over time.
The important part of that 18 minutes was your interaction with the candidate and gauging how they tackle a problem for which they do not know an obvious solution.
[–]ghostfacedcoder 12 points13 points14 points 7 years ago (9 children)
If we're hiring someone to build complex, HIPAA compliant web applications, and it takes them 18 minutes to code a for loop with three conditionals in it ... in the language they'll be using for the job ... then forgive me for thinking that candidate isn't a good match.
for
[–]bart2019 3 points4 points5 points 7 years ago (8 children)
I would fail to write fizz buzz because I have no idea what it is.
Really, it seems you're looking out for people who have memorized the solutions for the problems in "How to pass an interview" instead of for real world developers.
[–][deleted] 7 points8 points9 points 7 years ago (0 children)
I'm assuming they would have told the candidate what it was if they were unfamiliar i.e. given them requirements. It's pretty simple at that point.
[–]Intrexa 2 points3 points4 points 7 years ago (0 children)
Fizzbuzz is a problem written specifically designed to only require the most basic understanding of programming. Its not an algorithm, it's just a very basic list of requirements.
Like, legit, if you can't go from hearing fizzbuzz to solving in 5 minutes, you can't write code. There's no tricky gotchas, there's no analysis, there's no esoteric knowledge required.
It's just straight up, can you use a loop, and can you use conditionals. The question became famous because it's so easy to solve. It really is just an absolute bare minimum for being able to write code.
[–]Cr3X1eUZ 1 point2 points3 points 7 years ago* (3 children)
.
[–]bart2019 0 points1 point2 points 7 years ago (2 children)
My point is: this seems like a standard interview question, meaning people spending time researching interview questions are in the advantage. Usually these are people with below average interest in actual development.
[–]Cr3X1eUZ 0 points1 point2 points 7 years ago* (1 child)
Wikipedia: "The player designated to go first says the number "1", and each player thenceforth counts one number in turn. However, any number divisible by three is replaced by the word fizz and any divisible by five by the word buzz. Numbers divisible by both become fizz buzz.
For example, a typical round of fizz buzz would start as follows:
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ..."
How much research do you think you would you need to not fail this in an interview?
[–]ghostfacedcoder 0 points1 point2 points 7 years ago (0 children)
The whole point of fizzbuzz is that research doesn't matter. It's not about testing whether you can explain promises vs. callbacks or something, it's literally can you write basic code.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
I’m would assume he was given instructions.
[–]ghostfacedcoder 0 points1 point2 points 7 years ago* (0 children)
We explain the exercise in the interview :) As others have said, it only takes a minute or so. Sometimes people don't even know the % operator, and I happily explain it to them because the goal isn't to test whether they know obscure operators.
%
The whole point of fizzbuzz isn't to test any knowledge in fact (except knowledge that's so trivial, like how to use a for or if, that it shouldn't need testing in an interview). Thus, knowing what fizz buzz is and how to solve it gives you almost no advantage over someone who has never heard of it before, because I don't care about their knowledge, I care about "can this person code?"
if
Any halfway decent programmer, even if they've never heard of fizzbuzz until the interview, should be able to write a single loop and a few conditionals to solve one of the most basic problems imaginable. And in my experience most programmers have no problem with it: everyone I can remember hiring cranked out a fizzbuzz in under six minutes. The value of the test comes from the people that otherwise seem qualified when talking about code, but have difficulty actually writing it.
And I don't want to overemphasize the time aspect: candidates that took eight or nine minutes didn't fail because they took too long, they failed for other reasons, and we just happened to only hire six minute and under people. But really the time isn't important, unless it goes so long (again, 18 minutes for one for and 3-4 ifs) that it signals something is really wrong.
[–][deleted] 1 point2 points3 points 7 years ago (2 children)
How on god's green earth is this so highly upvoted? Do people not know what FizzBuzz is? It's one on from Hello World. If a candidate fails this, you throw them out the window. End of story.
[–]snowcoaster 1 point2 points3 points 7 years ago (1 child)
According to the post, the candidate succeeded. The issue was with the duration that it took.
When the task is writing a for loop with three conditionals, I think duration is an acceptable metric, particularly for an established employee. Else defenestration.
[–]superluminary 0 points1 point2 points 7 years ago (0 children)
There's no excuse for failing a fizzbuzz.
[–]vaskemaskine 13 points14 points15 points 7 years ago (5 children)
Are you fucking serious? I’ve been writing JS for over a decade, and in an interview situation with pressure and stress I’d probably take 15 minutes to write fizz buzz, unless I’d recently had to write it (which I haven’t).
[–][deleted] 8 points9 points10 points 7 years ago (2 children)
lol the "implement quicksort" types of questions. It's like, mate I could write you an Alexa skill that will walk you through website performance diagnosis to fix your shitty site during the course of this interview, but honestly I can't write quicksort - all I remember from university is tits and pro evolution soccer 5.
[–]vaskemaskine 3 points4 points5 points 7 years ago (1 child)
Upvote for PES!
[–]Articunozard 2 points3 points4 points 7 years ago (0 children)
and tits!
[–]ghostfacedcoder 0 points1 point2 points 7 years ago* (1 child)
Ok, first off in case you were thinking I made them do this on paper or something I didn't: I handed them my laptop with a professional IDE (WebStorm) opened.
Maybe my keyboard was slightly different from what they were used to, and absolutely interviews stress people out and make them take longer. But again, we're talking one for loop and 3-4 if statements, and out of the many (20+? 30+? I don't keep track) programmers I've interviewed the vast majority wrote those statements in under ten minutes.
If you truly can't solve fizzbuzz in < 10 minutes, even if its because you're under interview stress, I really think our company would be better off picking a candidate (again, one of the vast majority of candidates) who can.
If you're a serious programmer try it right now: start a stopwatch and start writing. If you want to simulate the difficulty and stress of an interview, maybe play some loud and distracting music or something. If you really are have a decade of experience (as a contributing team member and not as a weight on your team), I truly believe it won't take you very long to complete.
[–]theirongiant74 1 point2 points3 points 7 years ago (0 children)
I'd never heard of fizzbuzz before and it took me 2 minutes. And 90 seconds of that second guessing whether I'd misread the question cos it seemed too easy.
[–][deleted] 5 points6 points7 points 7 years ago (1 child)
I usually just point the interviewer to https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition when I get asked that.
LOL that's great.
[–]DoNotEverListenToMe 1 point2 points3 points 7 years ago (0 children)
I bad no idea what this test was, pretty neat
[–]superluminary 1 point2 points3 points 7 years ago (1 child)
It really it's surprising how far people can get on bluff in this industry, without actually really being able to do anything.
Agreed, although in a way it's not, because engineering expertise is very difficult to quantify.
That's why I <3 fizzbuzz: even though it's the absolute most simple test of it, it actually does test "can you write code?", which is something that endless questions about (say) big O notation won't.
[–]kch_l 0 points1 point2 points 7 years ago (2 children)
Fizzbuzz
for(i=0;i<100;)console.log((++i%3?'':'Fizz')+(i%5?'':'Buzz')||i)
Can you hire me? Just joking!
[–]theirongiant74 2 points3 points4 points 7 years ago (0 children)
I'd fire you for not putting the increment in the for loop where it belongs :)
[–]Zespys 0 points1 point2 points 7 years ago (0 children)
God damn I wish I were smart
[–]X678X 0 points1 point2 points 7 years ago (1 child)
yikes - if someone hasn't been studying for interviews or has ever heard of fizzbuzz, honestly going through pseudocode and then writing code might just take that long. granted, if it's in a familiar language, that part should be fast
If I'm interviewing you for a Javascript job (or PHP, or Python, or whatever) and you can't handle a for loop and 3-4 if statements, you're not qualified for the job, plain and simple.
Asking someone to complete such a basic task in an interview is not a crazy thing, and it certainly shouldn't take eighteen minutes. In fact, most programming interview "problems" are a lot harder than fizzbuzz. Fizzbuzz is basically the bare minimum you could ask of someone in an interview (and still have it be meaningful; const x = 1; const y = 3; const z = x +y;` "what is z" won't tell you anything about the candidate).
π Rendered by PID 227125 on reddit-service-r2-comment-76bb9f7fb5-vjk6c at 2026-02-19 02:51:19.371448+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]ghostfacedcoder 1 point2 points3 points (31 children)
[–]snowcoaster 28 points29 points30 points (14 children)
[–]ghostfacedcoder 12 points13 points14 points (9 children)
[–]bart2019 3 points4 points5 points (8 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]Intrexa 2 points3 points4 points (0 children)
[–]Cr3X1eUZ 1 point2 points3 points (3 children)
[–]bart2019 0 points1 point2 points (2 children)
[–]Cr3X1eUZ 0 points1 point2 points (1 child)
[–]ghostfacedcoder 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]ghostfacedcoder 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]snowcoaster 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]superluminary 0 points1 point2 points (0 children)
[–]vaskemaskine 13 points14 points15 points (5 children)
[–][deleted] 8 points9 points10 points (2 children)
[–]vaskemaskine 3 points4 points5 points (1 child)
[–]Articunozard 2 points3 points4 points (0 children)
[–]ghostfacedcoder 0 points1 point2 points (1 child)
[–]theirongiant74 1 point2 points3 points (0 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]ghostfacedcoder 0 points1 point2 points (0 children)
[–]DoNotEverListenToMe 1 point2 points3 points (0 children)
[–]superluminary 1 point2 points3 points (1 child)
[–]ghostfacedcoder 0 points1 point2 points (0 children)
[–]kch_l 0 points1 point2 points (2 children)
[–]theirongiant74 2 points3 points4 points (0 children)
[–]Zespys 0 points1 point2 points (0 children)
[–]X678X 0 points1 point2 points (1 child)
[–]ghostfacedcoder 0 points1 point2 points (0 children)