The code

                    
                      function fizzBuzz() {
                        let startingNumber = parseInt(document.getElementById("startNumber").value);
                        let endingNumber = parseInt(document.getElementById("endNumber").value);
                      
                        if (Number.isInteger(startingNumber) && Number.isInteger(endingNumber)) {
                          let numbers = generateFizz(startingNumber, endingNumber);
                          displayFizz(numbers);
                        } else {
                          Swal.fire({
                            icon: "error",
                            title: "Oops....",
                            text: "Only Integers are allowed for hundo!",
                          });
                        }
                      }
                      
                      function generateFizz(start, end) {
                        let numbers = [];
                      
                        for (let i = start; i <= end; i++) {
                          numbers.push(i);
                        }
                      
                        return numbers;
                      }
                      
                      function displayFizz(numbers) {
                        let templateRows = "";
                      
                        for (let i = 0; i < numbers.length; i++) {
                          let className = "";
                          let message = "";
                          let number = numbers[i];
                          if (numbers[i] % 3 == 0 && numbers[i] % 5 == 0) {
                            className = "fizzBuzz";
                            message = "FizzBuZZ";
                          } else if (numbers[i] % 5 == 0) {
                            className = "buzz";
                            message = "Buzz";
                          } else if (numbers[i] % 3 == 0) {
                            className = "fizz";
                            message = "FiZZ";
                          } else {
                            message = "" + number;
                          }
                      
                          templateRows =
                            templateRows + `${message} `;
                        }
                      
                        document.getElementById("results").innerHTML = templateRows;
                      }                         
                    
                

Our code is structured in three functions: fizzBuzz, generateFizz and displayFizz

fizbuzz()

This function is the main function of the application. It gets the value of starting number and ending number. Using boolean logic, it makes sure that input being entered by the user is strictly an integer. It then makes a call to the othet two functions in order to succesfully execute the code.

generateFizz()

This function is fairly simple. It utilizes a for loop to display the numbers. We initialize an empty array and keep pushing the elements to the end of the array until the condition in the for loop is met.

displayFizz()

In this function, we use boolean logic to display the results depending upon the condition (whether the number is divisble by 3,5, or both).