title: Dice Roller using EJS
body: <p>I have the following code. I am trying to make a dice roller. However, the button doesn't seem to be functioning.  Any ideas what I am missing?  Is my EJS incorrect?</p>
  
  <pre><code>  &lt;div class="dicecontainer"&gt;
      &lt;div class="dice"&gt;&lt;p id="rollresult"&gt;Result&lt;/p&gt;&lt;/div&gt;
  
        &lt;%  function roll() { %&gt;
          &lt;%  var result =  Math.floor(Math.random() * 6 + 1); %&gt; 
          &lt;% document.getElementById("rollresult").innerHTML=result; %&gt;
        &lt;%  }; %&gt;
  
       &lt;button onclick="roll()"&gt;Roll Dice&lt;/button&gt; 
   &lt;/div&gt;
  </code></pre>