title: Append to array in UserDefaults
body: <p>First I import the existing array saved in user defaults in key - array1  </p>
  
  <pre><code>var savedArray = UserDefaults.standard.array(forKey: "array1") as! [String]
  var ns = UserDefaults.standard
  </code></pre>
  
  <p>Then</p>
  
  <pre><code>let savedValue = name
  </code></pre>
  
  <p>Then</p>
  
  <pre><code>savedArray.append(savedValue!) 
  </code></pre>
  
  <p>Then I save it in key - array1</p>
  
  <pre><code>UserDefaults.standard.set(savedArray, forKey: "array1")
  </code></pre>
  
  <p>And sync</p>
  
  <pre><code>ns.synchronize()
  </code></pre>
  
  <p>However, if I go into another viewcontroller and do this           </p>
  
  <pre><code>let alreadyShownarray = UserDefaults.standard.object(forKey: "array1") as! [String]
  print (alreadyShownarray)
  </code></pre>
  
  <p>Then I get the same array without the appended <code>savedValue!</code></p>