title: How do I update this variable with data
body: <p>New programmer here! I'm working with a network request and below is a snippet of my code. After I complete the network request I want to store a value from the request into a variable. However, when the variable is called outside of the if let statement it is NOT updated. Essentially, the print statement inside the if let statement prints the value I'm looking for, but the print statement outside of the <code>if let</code> statement prints the default value I set for that variable. The variable is global. I need to use that updated variable elsewhere in my code, any ideas?</p>
  
  <pre><code>        if let data = data {
              self.nameLabel.text = data.name
              person = data.name
              print(person)
          }
          print(person)
  </code></pre>