Displaying Javascript variables in HTML

Well, if you want to display a variable in HTML from JS there is a simple(ish) way to do that. First you can create the element: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement

Next, edit the created element. In the step before just give it an id (shown on the website above and below). https://www.w3schools.com/js/js_htmldom_html.asp

Hope that works,
Ben A.K.A BlackSky

Leave a Comment