title: How to connecting the function, createElement and random?
body: <p>Here is my code and I am trying to make a button that makes random buttons but I cant connect the code right.</p>
  
  <pre>
  
  p id="demo">Click the button to display a random number. /p>
  
  button onclick="myFunction()">Try it     /button>
  
  script type="text/javascript">
  
  
      function myFunction(){
          var num = 5;
          document.getElementById("demo").innerHTML=Math.floor(Math.random()*num)
  
          var box=document.createElement("BUTTON");
          document.body.appendChild(box);
  
          var c = num + box;
          return c;
      }
  
  </pre>
  
  <p>Can anyone help me please?</p>