FizzBuzz is an industry standard coding challenge that is a healthy mix of programming and math. Fortunately for me, I handle the programming, and the my code handles the math. You will usually see FizzBuzz written to take a range of numbers and run them through a looping function. For each multiple of 3 or 5, a different output will be displayed. If a number is a multiple of both, well that is a special case.
I took it a step further. I have written the same function to perform the multiple finding function, but I have given the user the ability to give their own multiples, rather than limit them to 3 and 5. This was done by simply collecting the user input and incorporating it into the function.
For more information on loops in JavaScript, visit
www.w3schools.com.
What's happening?
Why's it happening?