title: NSIndexPath in Swift
body: <p>I know, hopefully, that class NSIndexPath deals with arrays which has arrays.</p>
  
  <p>I have this code:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITableViewDataSource {
  
      let devCourses = [
          ("iOS App Dev with Swift Essential Training","Simon Allardice"),
          ("iOS 8 SDK New Features","Lee Brimelow"),
          ("Data Visualization with D3.js","Ray Villalobos"),
          ("Swift Essential Training","Simon Allardice"),
          ("Up and Running with AngularJS","Ray Villalobos"),
          ("MySQL Essential Training","Bill Weinman"),
          ("Building Adaptive Android Apps with Fragments","David Gassner"),
          ("Advanced Unity 3D Game Programming","Michael House"),
          ("Up and Running with Ubuntu Desktop Linux","Scott Simpson"),
          ("Up and Running with C","Dan Gookin") ]
  
      func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
          return 1
      }
  
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return devCourses.count
      }
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
          var cell = UITableViewCell()
  
          let (courseTitle, courseAuthor) = devCourses[indexPath.row]
          cell.textLabel?.text = courseTitle
  
          return cell
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
  
  }
  </code></pre>
  
  <p>What I don't understand how NSIndexPath works. I have read documentation but is it still too hard for me to understand at this point of my learning how this works. How can I know NSIndexPath has property of row? Cans somebody explain every part of this line please:</p>
  
  <pre><code>let (courseTitle, courseAuthor) = devCourses[indexPath.row]
  </code></pre>
  
  <p>How does NSIndexPath know that courseTitle in this constant refers to index number 0 whitin array index 0 <code>("iOS App Dev with Swift Essential Training","Simon Allardice")</code></p>