Fizz buzz is a group word game for children to teach them about division.
Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz", and any number divisible by both 3 and 5 with the word "fizzbuzz".
Fizz buzz (often spelled FizzBuzz in this context) has been used as an interview screening device for computer programmers.
Writing a program to output the first 100 FizzBuzz numbers is a relatively trivial problem requiring little more than a loop and conditional statements.
However, its value in coding interviews is to analyze fundamental coding habits that may be indicative of overall coding ingenuity.
- Open the terminal
- Execute the command
node main.js