The Code for THE 100.
The Code is structured in three functions.
getValues()
The getValues() function is responsible for retrieving the numbers the user provides in the input fields and parsing them as integers. If both inputs provided by the user are numbers then it will call the generateNumbers() and displayNumbers() functions described below.
generateNumbers()
The generateNumbers() function takes two parameters which are the starting value and the end value. The function uses a for loop to iterate through the numbers between the values the user provided and pushes those numbers to an array. The array is then returned.
displayNumbers()
The displayNumbers() function takes one parameter which is an array of integers. The function retrieves the table made in HTML using the id and then sets the innerHTML to be empty so if the user spams the button it does not constantly add to the old table. Then using a for loop to iterate through the array of numbers (these are all the numbers between the 2 values the user provided) it seperates the numbers into two categories using if statements. If the number is divisible by two then it will appear bolded otherwise the number will appear normally