Based on your current code, the easiest thing to do would be to modify this line
numberDiv.innerHTML=numberArray;
to
numberDiv.innerHTML=numberArray.join('’);
Also, the reason the comma appears under your paragraph with spacing is because the paragraph element’s style for display is block. The comma is just a text node in the DOM.
In terms of the best way to do this, updating innerHTML With a joined array seems fine.
Ahhh awesome! Got it all working now, thanks for your help!
N.B. There was a small error in your code above, just an apostrophe and a back tick in the brackets, as opposed to two apostrophes. - I wasn't sure if you were trying to catch me out 😂.
Based on your current code, the easiest thing to do would be to modify this line
to
Also, the reason the comma appears under your paragraph with spacing is because the paragraph element’s style for
displayisblock. The comma is just a text node in the DOM.In terms of the best way to do this, updating
innerHTMLWith a joined array seems fine.Hope that helps!
Ahhh awesome! Got it all working now, thanks for your help!
N.B. There was a small error in your code above, just an apostrophe and a back tick in the brackets, as opposed to two apostrophes. - I wasn't sure if you were trying to catch me out 😂.
Thanks again Nick, much appreciated!
Ah, I was on mobile. I must have picked the wrong one when closing the empty string. Glad it’s all sorted.