My website features a JavaScript function that generates an array of varying size based on user input.
I use the following code to display the output array, perArray, along with some additional text.
document.getElementById("happyanswer").innerHTML= perArray + " are so happy, yes they are!!!";
The quoted text always remains within the div. As the array elements are displayed, they shift to the right until all elements are shown.
You can view the fiddle here.
Currently, only the happy numbers button is functional. Feel free to disregard any other remaining issues (I'm aware there are many).