title: using .slice method on an array
body: <p>I'm practicing the array section of JavaScript Koan and I'm not fully understanding why these answers are correct. I added my assumptions below if someone could please clarify/let me know if I'm wrong :</p>
  
  <pre><code>  it("should slice arrays", function () {
      var array = ["peanut", "butter", "and", "jelly"];
  
      expect(array.slice(3, 0)).toEqual([]);       
  </code></pre>
  
  <blockquote>
    <p>Why wouldn't it at least slice "jelly" since the slice begins with
    3?  How does the cut off of 0 make it empty instead?</p>
  </blockquote>
  
  <pre><code>    expect(array.slice(3, 100)).toEqual(["jelly"]);  
  </code></pre>
  
  <blockquote>
    <p>If the cut off index goes beyond what currently exists in the array,
    does this mean that a new array created from slice would contain all
    indexes starting at 3 until the end of the array?</p>
  </blockquote>
  
  <pre><code>    expect(array.slice(5, 1)).toEqual([undefined];  
  </code></pre>
  
  <blockquote>
    <p>Will it always be undefined if the starting index doesn't exist in the
    array?</p>
  </blockquote>
  
  <pre><code>  });
  </code></pre>