title: How To Replace All Matching Array Elements?
body: <p>I am replacing an item in my array with this code:</p>
  <pre><code>var array = [&quot;&quot;, &quot;Orange&quot;, &quot;Grape&quot;, &quot;Apple&quot;]
  if let i = array.firstIndex(of: &quot;&quot;) {
                              array[i] = &quot;Blank&quot;
                          }
                          print(&quot;\(array)&quot;). //[&quot;Blank&quot;, &quot;Orange&quot;, &quot;Grape&quot;, &quot;Apple&quot;]
  </code></pre>
  <p>My only issue with this is it only replaces the FIRST item matching, so my question is-- is there any way to replace ALL items matching?</p>
  <p>It's possible this has been answered before but I'm unable to find it.</p>