$("#execute").on("click", function () {
// Grab user data
var inputArray = [
Number($("#blank1").val()),
Number($("#blank2").val()),
Number($("#blank3").val()),
Number($("#blank4").val()),
Number($("#blank5").val()),
]
// Prepare arrays for processing
var largestvalue = inputArray[0];
var tallest = [largestvalue];
// Sort the array
for (let loop = 1; loop < inputArray.length; loop++)
{
if (inputArray[loop] > largestvalue)
{
largestvalue = inputArray[loop];
tallest.push(largestvalue);
}
}
// Print results to the user
$("#title").text("The Numbers");
$("#sub").html(`The buildings of ${tallest} have a view of the sunset.`)
$("#blank1, #blank2, #blank3, #blank4, #blank5").val("");
});