title: Change for loop index in Kotlin
body: <p>How can I modify the loop variable in Kotlin?</p>
  
  <p>For my particular case, I have a for-loop in which, for certain conditions, I want to skip the next iteration:</p>
  
  <pre><code>for(i in 0..n) {
    // ...
    if(someCond) {
      i++ // Skip the next iteration
    }
  }
  </code></pre>
  
  <p>However, when I try this, I'm told that "val cannot be reassigned".</p>