title: Swift remove objects in Array range
body: <p>I have an array as a property in a class.</p>
  
  <pre><code>Class Custom {
   let objArray: [CustomClass]
  }
  </code></pre>
  
  <p>I want to remove some items in objArray in a range. So I have done below</p>
  
  <pre><code>let newVar  = objArray[1...3]
  </code></pre>
  
  <p>new objects are correctly removed but return value is in  newVar since array is value type  how I can make the original reflect the same.</p>
  
  <p>Below code gets Index out of bounds as the indexes incremented </p>
  
  <pre><code>for i in 1...3 {
  
    objArray.remove(at: 1)
  }
  </code></pre>
  
  <p>======</p>
  
  <p>What is the best approach for the above issue.</p>
  
  <p>Any hint in right direction would be highly appreciated.</p>