title: Value undefined when accessed out of observable subscription
body: <p>I'm trying to get a value outside of subsciption in vain. The value is undefined. Kindly assist.</p>
  <pre><code>repos:Repo[];
  
  constructor(private route:ActivatedRoute, private githubAPIservice:GihubAPIService) {  }
    
  ngOnInit(): void {
      this.username = this.route.snapshot.queryParams['username'];
  
      this.githubAPIservice.getUserRepos(this.username)
          .subscribe(response =&gt; { 
                                  this.repos = response;
                                  console.log(this.repos) //accessible
                               }
                  console.log(this.repos) //undefined
             )
           }
  </code></pre>