title: How to get my code to show programmatically in my html file
body: <p>i'm trying to get my code to show the objects on webpage as well as the image associated with it and  Each car object should also include a showMore() method. This
  method should display a dialogue that displays all the details about
  the specific car object.</p>
  <p>here's the code:</p>
  <pre><code>const show = document.getElementById('show');
  function carDescription(make, model, colour, image, registrationnumber, price ) {
      this.make = make;
      this.model = model;
      this.colour = colour;
      this.image = image;
      this.registrationnumber = registrationnumber;
      this.price = price;
  };
  let car = { make:&quot;Porsche&quot;, model:&quot;GT3&quot;, colour:&quot;Black&quot;, image:&quot;src=https://pictures.topspeed.com/IMG/crop_webp/201210/1200hp-porsche-911-g_1920x1080.webp&quot; , registrationnumber:&quot;LMO 909 GP&quot;, price: 1000000};
  let car2 = newcarDescription(&quot;Ford&quot;, &quot;Fiesta&quot;, &quot;Red&quot;,&quot;https://i.ytimg.com/vi/abVgt23rmrA/hqdefault.jpg&quot;, &quot;MNO 010 EC&quot;,  100000);
  let car3 = newcarDescription(&quot;Opel&quot;, &quot;Corsa&quot;, &quot;White&quot;,&quot;https://img.gumtree.co.za/api/v1/za-pt10-ads/images/a1/a15f67b3-c11c-40b6-85ad-2987e84e956b?rule=s-I3.auto&quot;, &quot;KLJ 899 GP&quot;,  55000);
  let car4 = newcarDescription(&quot;Mazda&quot;, &quot;CX-5&quot;, &quot;Black&quot;,&quot;https://i.pinimg.com/originals/54/d2/0b/54d20b0bee90aaef22a68b5628441832.jpg&quot; ,&quot;TYH 890 GP&quot;,  210000);
  let car5 = newcarDescription(&quot;Toyota&quot;, &quot;Hilux&quot;, &quot;Gold&quot;,&quot;https://imganuncios.mitula.net/medium/toyota_hilux_toyota_hilux_1050104654262066309.jpg&quot; ,&quot;HSG 573 EC&quot;,  250000);
  
  
  function print()
  {
      let myString = JSON.stringify(car);
  document.getElementById(&quot;show&quot;).innerHTML = `&lt;h3&gt;${car}&lt;/h3&gt;`
  }
  </code></pre>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html onload=&quot;print()&quot;  lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Cars&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body &gt;
      &lt;div id=&quot;show&quot;&gt;
  
      &lt;/div&gt;
  
      
      &lt;script src=&quot;cars.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>