title: AngularJS 1; splice from one array and push to another
body: <pre><code>  service.checkOff = function(itemIndex) {
          var boughtItem = toBuyList.splice(itemIndex, 1)[0] ;
          boughtList.push(boughtItem);
              debugger;
      };
  </code></pre>
  
  <p>My question is what does the [0] signify in line 2 above?  I am trying to splice 1 item from an array and push it to another.  I need the [0] to transfer the item.  If I omit it, my code iterates but the value of the array item does not get pushed to the second array (boughtItem). Thanks.  Haven't found it in the documentation.</p>