# FizzBuzz by [kirupa](https://www.kirupa.com/about/whatiskirupa.htm) | 17 May 2018 There are a bunch of challenges that can help gauge whether you have a basic grasp of programming fundamentals. None of the challenges is as famous as **FizzBuzz**! ## The Challenge The FizzBuzz challenge is as follows: 1. Print a number from 1 to 100 using `console.log` 1. If a number is a multiple of 3, print **Fizz** instead of the number 1. If a number is a multiple of 5, print **Buzz** instead of the number 1. If a number is a multiple of both 3 and 5, print **FizzBuzz** instead of the number To get started, create a new HTML document with the following content as your starting point: ```html FizzBuzz ``` If you preview this document in your browser, you won't see much. If you bring up your browser's developer tools, you'll see the following message printed in the Console: ![](https://www.kirupa.com/html5/images/fizzbuzz_console.png) If you see that message, you are in good shape to get started. Just replace that line of code and start coding up the FizzBuzz challenge. ## The Result You'll know you are done when the final result of your code running prints the following to your Console: ```js 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 FizzBuzz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 FizzBuzz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 FizzBuzz 61 62 Fizz 64 Buzz Fizz 67 68 Fizz Buzz 71 Fizz 73 74 FizzBuzz 76 77 Fizz 79 Buzz Fizz 82 83 Fizz Buzz 86 Fizz 88 89 FizzBuzz 91 92 Fizz 94 Buzz Fizz 97 98 Fizz Buzz ``` At this point, you should have all the necessary information to get started. Now....ready, set, go! ## Hints In case you get stuck, here are a few hints that may help you out: 1. To learn more about loops and how to execute some code over and over and over...and over again, [go here](https://www.kirupa.com/html5/loops_in_javascript.htm) 1. **If** and **else** statements are your friend. If you don't know them, befriend them [in this article](https://www.kirupa.com/html5/conditional_statements_if_else_switch_javascript.htm). 1. One way to check if something is divisible is to see if the remainder of the division is 0. To learn how to do that, the [Numbers in JavaScript article](https://www.kirupa.com/html5/numbers_in_javascript.htm) will help you out 1. To learn all the cool things the Console can do, check out the [Console Logging basics](https://www.kirupa.com/html5/console.htm) article If you are still stuck, post on the [forums](https://forum.kirupa.com) and a bunch of friendly people will help you out. ## Share Your Answer If you think you have a working solution, don't just keep it to yourself. Share it with others and get some feedback from others just like you. Post your solution to the [following thread](https://forum.kirupa.com/t/fizzbuzz/638235/2) (you can see the answers if you scroll further down below) and see how your answer stacks up with what others have posted.