Fatal error: Index out of range for in loops swift 3
<p>Im trying to create a save to pdf method using the simplePDF framework on Github. I have several arrays and have tried to use a for in loop. Its my first go at this, but I do not understand why I am getting fatal error: Index out of range. Here is my code.</p>

<pre><code>let A4paperSize = CGSize(width: 595, height: 842)
    let pdf = SimplePDF(pageSize: A4paperSize)
    pdf.setContentAlignment(.center)

    let count = Globals.datesArray.count
    var sum = 0

    for index in 0...count {
        pdf.addText(Globals.datesArray[index])
        pdf.addText(Globals.titleArray[index])
        pdf.addText(Globals.descriptionArray[index])
        sum += index
    }

    let pdfData = pdf.generatePDFdata()
</code></pre>

<p>Any help  is much appreciated. Thanks!</p>