title: how to remove elements of array?
body: <p>Is it possible to remove the contents of the array based on the index? If I have 2 arrays like these:</p>
  
  <p>Array1 that contains 15 values and I want to get the last 10 values.</p>
  
  <p>Before removing elements:</p>
  
  <pre><code>array1 == [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
  </code></pre>
  
  <p>After removing elements:</p>
  
  <pre><code>array1 == [5,6,7,8,9,10,11,12,13,14]
  </code></pre>
  
  <p>Array2 that contains 15 values and then I want to get only the first 10 values.</p>
  
  <p>Before removing elements:</p>
  
  <pre><code>array2 == [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
  </code></pre>
  
  <p>After removing elements:</p>
  
  <pre><code>array2 == [0,1,2,3,4,5,6,7,8,9]
  </code></pre>
  
  <p>But there are conditions that must be fulfilled:</p>
  
  <p>if the array only contains 3 elements is not necessary to discard the elements in the array, as well as if the array contains 10 elements only. but if the array contains more than 10 elements, the excess is discarded.</p>