The Code
getValues
This acts as the user input validation, and sets up the inputs for use in the rest of the applet. It starts out pulling in data from HTML inputs and assigning them to variables to be passed as parameters to other functions. Once this is done it attempts to convert these strings to intergers. Verifies that it has done so and then calls the generateFizzBuzz function to get started on actually performing the logic for Fizzbuzz. Finally it passes back the array it gets from the generateFizzBuzz function onto the displayFizzBuzz function to construct the HTML that is then displayed for the user.
generateFizzBuzz
This function initializes an empty array then uses basic logic to check each number from 1 to the user's designated end number (100 by default). We start by checking to see if the number i is divisible cleanly by both user defined divisors (3 and 5 by default), and then proceeds to check divisibility for both individually. This is done in this order to ensure that a number is not processed before completion. If it can be cleanly divided into by any or all of these categories then we push the correct word to the array. However if a number cannot be divided evenly by either we push the number to the array.
displayFizzBuzz
Here we build out the HTML to be displayed on the page. We start at the bottom of the array and wrap each array element in a div to be displayed on the page. Depending on the contents of the array we add a class to help further stylize the output of the funtion using CSS. This makes seeing patterns in Fizzbuzz much easier and more visually appealing for the user.