title: Swift how to read through all indexes of array using for loop with index [i]
body: <p>The Code I have so far only does for 1 index however I want it to read all existing indexes within the array. element array can carry many groups of numbers for example 
  Array ["2,2,5" , "5,2,1"] contains 2 indexes [0] and [1]</p>
  
  <pre><code>var element = Array[0]
  let splitData = element.components(separatedBy: ",")
  
  // split data will always contain 3 values.
  var value1 = splitData[0]
  var value2 = splitData[1]
  var value3 = splitData[2]
  
  print("value 1 is : " + value1 + " value 2 is : " + value2 + " value 3 is: " + value3)
  </code></pre>
  
  <p>the output of this code when <code>Array ["2,2,5" , "5,2,1"]</code> is :</p>
  
  <pre><code>value 1 is : 2 value 2 is : 2 value 3 is : 5
  </code></pre>
  
  <p>As the output suggests how can i iterate through all indexes of Array to display each of their 3 values. </p>
  
  <p>I want the output to be :</p>
  
  <pre><code>value 1 is : 2 value 2 is : 2 value 3 is : 5
  value 1 is : 5 value 2 is : 2 value 3 is : 1
  </code></pre>
  
  <p>I believe I need to use a for loop however I am unsure how to apply it to this. I am quite new to coding. Any help will be Appreciated</p>