title: How can I fix 'Cannot convert value of type 'String' to expected argument type 'Int' in this for loop
body: <p>After hours of trying to find an answer, I'm officially stumped.</p>
  
  <p>I have an array of strings:</p>
  
  <pre><code>let artists = ["Robben Ford", "Joe Bonamassa", "Eric Clapton", "Matt Schofield"]
  </code></pre>
  
  <p>Now I want to iterate over that array like this:</p>
  
  <pre><code>func refresh() {
      for artist in artists {
         let indexPath = NSIndexPath(forItem: artist, inSection: 0) &lt;---- Error
         if let cell = tableView.cellForRowAtIndexPath(indexPath) {
            cell.textLabel?.text = artist
        }
  }
  </code></pre>
  
  <p>Xcode complains at the let indexPath statement, 'Cannot convert value of type 'String' to expected argument type 'Int'. I understand that it expects forItem to be an Int but I can't figure out how to make it one. </p>
  
  <p>I did try changing the for loop to </p>
  
  <pre><code>for artist in artists.enumerate() {
       }
  </code></pre>
  
  <p>but then it just says it can't covert '(index: Int, element: String)'.</p>
  
  <p>The fix must be obvious to a non-beginner but it's not obvious to me.</p>
  
  <p>Thanks in advance.</p>