title: I NEED TO CREATE A DICE OBJECT, automatically roll the dice the first time when the page is first loaded in my html js
body: <p>hey guys i need some guidance on how to add onload to my dice roller</p>
  
  <pre><code>&lt; script &gt; 
        function rollDice() {
          var die1 = document.getElementById("die1");
          var die2 = document.getElementById("die2");
          var status = document.getElementById("status");
          var d1 = Math.floor(Math.random() * 6) + 1;
          var d2 = Math.floor(Math.random() * 6) + 1;
          var diceTotal = d1 + d2;
          die1.innerHTML = d1;
          die2.innerHTML = d2;
          status.innerHTML = "You rolled " + diceTotal + ".";}
  
  &lt;/script&gt;
  </code></pre>