title: Make Literal Object have Parameters?
body: <p>Currently I'm using Javascript to display animals and their info on a HMTL Page.</p>
  
  <p>Currently its showing the Image of a bunny and info like this:</p>
  
  <blockquote>
    <p><em>BUNNY IMAGE</em><br>
    <strong>Age Range:</strong> 3 months - 2 Years<br>
    <strong>Max adopt:</strong> 1-2<br>
    <strong>Bonded Pairs:</strong> Yes<br>
    <strong>Needing homes:</strong> 5 </p>
  </blockquote>
  
  <p>I need to make the Age range, max adopt  etc a parameter instead of just manually making the text bold and writing it. here's my JS: </p>
  
  <pre><code>var bunny = {
    animalName: 'Bunny',
    bondedPairs: '&lt;b&gt;Bonded Pairs: &lt;/b&gt; Yes',
    maxAdopt: "&lt;b&gt;Max adopt: &lt;/b&gt; 1-2",
    ageRange: "&lt;b&gt;Age Range: &lt;/b&gt; 3 months - 2 Years",
    needingHomes: '&lt;b&gt;Needing homes: &lt;/b&gt; 5',
    avatarSrc: '../images/bunny.jpg',
    note: 'note: We have lots of adorable fluffy loafs looking for their forever homes.',
  
    createProfile: function() {
      //creates a div to store their staff info
      var profile = document.createElement("div");
      //sets the class
      profile.className = "animalProfile";
      //creates a new image for the profile pic
      var avatar = document.createElement("img");
      //sets the source and name based on our object info
      avatar.src = this.avatarSrc;
      avatar.alt = this.animalName;
      //appends the image to the profile div
      profile.appendChild(avatar);
      //sets up the text
      var profileTxt = document.createElement("p");
      profileTxt.innerHTML = "&lt;b&gt;" + this.animalName + "&lt;/b&gt;&lt;br /&gt;" +
        "&lt;/b&gt;&lt;br /&gt;" + this.ageRange + "&lt;/b&gt;&lt;br /&gt;" + this.maxAdopt +
        "  &lt;/b&gt;&lt;br / &gt; " + this.bondedPairs +
        "&lt;/b&gt;&lt;br /&gt;" + this.needingHomes;
  
      //adds the text to the profile div
      profile.appendChild(profileTxt);
      //returns the completed profile
      return profile;
    }
  }
  
  document.getElementById("animal_list").appendChild(bunny.createProfile());
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var bunny = {
    animalName: 'Bunny',
    bondedPairs: '&lt;b&gt;Bonded Pairs: &lt;/b&gt; Yes',
    maxAdopt: "&lt;b&gt;Max adopt: &lt;/b&gt; 1-2",
    ageRange: "&lt;b&gt;Age Range: &lt;/b&gt; 3 months - 2 Years",
    needingHomes: '&lt;b&gt;Needing homes: &lt;/b&gt; 5',
    avatarSrc: '../images/bunny.jpg',
    note: 'note: We have lots of adorable fluffy loafs looking for their forever homes.',
  
    createProfile: function() {
      //creates a div to store their staff info
      var profile = document.createElement("div");
      //sets the class
      profile.className = "animalProfile";
      //creates a new image for the profile pic
      var avatar = document.createElement("img");
      //sets the source and name based on our object info
      avatar.src = this.avatarSrc;
      avatar.alt = this.animalName;
      //appends the image to the profile div
      profile.appendChild(avatar);
      //sets up the text
      var profileTxt = document.createElement("p");
      profileTxt.innerHTML = "&lt;b&gt;" + this.animalName + "&lt;/b&gt;&lt;br /&gt;" +
        "&lt;/b&gt;&lt;br /&gt;" + this.ageRange + "&lt;/b&gt;&lt;br /&gt;" + this.maxAdopt +
        "  &lt;/b&gt;&lt;br / &gt; " + this.bondedPairs +
        "&lt;/b&gt;&lt;br /&gt;" + this.needingHomes;
  
      //adds the text to the profile div
      profile.appendChild(profileTxt);
      //returns the completed profile
      return profile;
    }
  }
  
  document.getElementById("animal_list").appendChild(bunny.createProfile());</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background-color: lightblue;
  }
  
  #container {
    margin: 0 auto;
    width: 80%;
  }
  
  header {
    width: 100%;
    text-align: center;
  }
  
  section {
    width: 100%;
    text-align: center;
  }
  
  h1 {
    color: navy;
    font-family: 'Sofia', cursive;
    font-size: 2.5em;
    padding-top: 20px;
  }
  
  p {
    font-family: 'Quicksand', sans-serif;
    font-size: 16pt;
    text-align: center;
  }
  
  .animalProfile {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.5);
    width: 320px;
    height: 600px;
    border-radius: 5px;
    padding: 10px;
    margin: 10px;
    vertical-align: top;
  }
  
  .animalProfile img {
    max-width: 300px;
    border-radius: 5px;
    border: 2px solid #4d4d4d;
  }
  
  .animalProfile p {
    font-size: 12pt;
    text-align: left;
    margin: 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;title&gt;Animal Adoption&lt;/title&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;link href="https://fonts.googleapis.com/css?family=Sofia" rel="stylesheet" /&gt;
    &lt;link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet" /&gt;
    &lt;link rel="stylesheet" type="text/css" href="../css/adopt_styles.css" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="container"&gt;
      &lt;header&gt;
        &lt;h1 id="heading" class="blueTxt"&gt;Our Animals to Adopt&lt;/h1&gt;
      &lt;/header&gt;
      &lt;p&gt;All our animals are available to adopt to proven loving and caring homes with responsible owners.&lt;/p&gt;
      &lt;section&gt;
        &lt;div id="animal_list"&gt;
  
        &lt;/div&gt;
  
      &lt;/section&gt;
    &lt;/div&gt;
    &lt;script src="../js/animal_script.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>