title: Array does not perform a command in swift
body: <p>Array does not perform a command in swift </p>
  
  <p>I show a simple example</p>
  
  <pre><code>    var array = ["x", "y", "z"]
      var index = array.indexOf("y")
  </code></pre>
  
  <p>I get an error 
  <em>'[String]' does not have a member named 'indexOf'</em></p>
  
  <p>I saw <a href="https://stackoverflow.com/questions/24028860/how-to-find-index-of-list-item-in-apples-swift">this question</a> but it doesn't help me.</p>
  
  <p>I imported</p>
  
  <pre><code>import UIKit
  import Foundation
  import AVFoundation
  import CoreAudio
  import MediaPlayer
  import AVKit
  </code></pre>