title: Swift : How $0 works in Array.forEach?
body: <p>I have seen most of the swift developer are starting using .forEach, understood its another way to iterate array. But what is the meaning of '$0' and how it works? If it's an index then it should increment 0,1,2...</p>
  
  <pre><code>@IBOutlet var headingLabels: [UILabel]!
  ....
  
  headingLabels.forEach { $0.attributedText = NSAttributedString(string: $0.text!, attributes: [NSKernAttributeName: 1]) }
  </code></pre>