title: Creating a simple javascript inventory object
body: <p>I have been given an code stub for an inventory object as one of my assignments for my javascript module, under instruction to flesh it out to create an inventory which includes methods to add, and remove items from an items array. I'm struggling to figure out how to fill out the methods and was wondering if anybody could point me in the right direction.</p>
  
  <p>The code stub is:</p>
  
  <pre><code>var inventory = {
  items: [],
  add: function(item) {},
  remove: function(index) {}
  };
  </code></pre>
  
  <p>After a bit of googling I believe the methods i should be using are; </p>
  
  <pre><code>items.push("")
  items.splice("")
  </code></pre>
  
  <p>however i'm unsure how to slot them into code stub i have been provided.</p>
  
  <p>Any help would be much appreciated!</p>