title: Getting random number with each button click
body: <p>I'm trying to get a random number each time someone clicks a button.  The range of the numbers is from one(1) to five(5).  If this question has already been asked and answered, please point me to the question and I'll delete this one to avoid duplication.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="content"&gt;&lt;/div&gt;
  &lt;button id="add"&gt;Add Object&lt;/button&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$(document).ready(function(){
      var Player = {
          name: "One",
          weapon: Sword = {
              damage: 1 + Math.floor(Math.random() * 5),
              speed: 10
          }
      }
      var player_damage = Player.weapon.damage;
  
      $("#add").on("click", function(){
          $("#content").append(player_damage + " ");
      })
  })
  </code></pre>
  
  <p><a href="http://jsfiddle.net/hd7tec5f/1/" rel="nofollow">Fiddle</a></p>