I was following an example source code I found for populating a html table from javascript. However there is a disconnect in my knowledge. The javascript is inside a populateTable function to find an element and create the other elements for the table and populate it from an array.
I don't want this to be done from a button click but when the screen loads.
So lets say...
<h1>Products</h1>
<p>List of products below:</p>
<table> <--- how do I tell this table to be populated from my populateTable function
</table>
Any feedback is appreciated!
EDIT: - I'm clearly learning javascript :) Trying to do core javascript.