title: How to print both key-value pairs in this Swift for-in example
body: <p>This example is from Apple's "<a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#" rel="nofollow">A Swift Guide</a>" section demonstrating for-in.</p>
  
  <p>Super newbie question, but how come it's not printing the <code>type</code> variable too? Is it something to do with the scope?</p>
  
  <pre><code>let interestingNumbers = [
      "Prime": [2, 3, 5, 7, 11, 13],
      "Fibonacci": [1, 1, 2, 3, 5, 8],
      "Square": [1, 4, 9, 16, 25],
  ]
  var largest = 0
  var type: String
  for (kind, numbers) in interestingNumbers {
      for number in numbers {
          if number &gt; largest {
              largest = number
              type = kind
          }
      }
  }
  largest
  type
  </code></pre>