title: Why can't I read the value outside an observable
body: <p>I am new to swift and trying to teach myself how to build and iOS app.  I hooked up the backend to a Firebase Realtime Database and I am able to successfully read and write to the DB but I cannot access the values outside of an observable.</p>
  <pre><code>import UIKit
  import Firebase
  
  class ViewController: UIViewController {
      
      var ref:DatabaseReference!
      var test12:String!
      
      override func viewDidLoad() {
          
          self.ref = Database.database().reference()
          
          self.ref.child(&quot;Title&quot;).child(&quot;Name&quot;).observe(.value) { snapshot in
              self.test12 = snapshot.value! as? String
              print(self.test12!)
          }
          print(self.test12!)
          super.viewDidLoad()
      }
  }
  </code></pre>
  <p>The first print(self.test12!) prints out correctly so I know I am getting the correct information from there DB, but the second one errors out. How can I use the information I get back from the DB throughout my program?</p>