I have never understood why FizzBuzz was deemed a means of screening developers. The idea is for multiples of 3; you print Fizz. For multiples of 5, you print Buzz, and for multiples of 3 and 5 (15), you print FizzBuzz.
While this kind of prescreening question might have worked 15 years ago when information wasn’t as accessible as it is now (smartphones, smartwatches. etc.), it seems strange that some companies still ask developers how to write FizzBuzz.
The modulus operator returns the remainder of a division operation between two numbers. Ironically, it’s the kind of operator you don’t see many front-end developers using anyway. Even the most junior developers can easily Google before an interview to know that you use the modulus operator.
Here is a basic FizzBuzz implementation in Javascript
for (let i = 1; i <= 100; i++) { if (i % 15 === 0) { console.log("FizzBuzz"); } else if (i % 3 === 0) { console.log("Fizz"); } else if (i % 5 === 0) { console.log("Buzz"); } else { console.log(i); } }
In my experience, non-technical skills are more important than technical skills, and few companies focus on non-technical skills. Generally, I am against technical hiring trivia questions. They tell you nothing about the developer’s skill level if they’re an excellent culture fit, if they have a good attitude.
In the case of the aged old FizzBuzz, companies may ask for variations on FizzBuzz beyond the standard; 3, 5 and 15 divisions, but most likely not. If your company is using FizzBuzz screening questioning, it might be time to reevaluate if it’s effective.
Wow. That seems a pretty low bar for screening developers.
@kevmeister68
It is and sadly, a lot of companies still ask developers to do a FizzBuzz.