title: Angular TypeScript pushing items to array errors
body: <pre><code>export class PickGroupService {
    channelList: any[];
    pick5West = ['783', '679', '934', '946', '800'];
    thePicks: any[];
  
    constructor(private channels: ChannelsService) { this.channelList = this.channels.getChannels(); }
  
    getPickSet(pick, region) {
      if (pick === 'pick5') {
        switch (region) {
          case 'west':
          for (let i = 0; i &lt; this.pick5West.length; i++) {
            this.thePicks.push((this.channelList.filter(x =&gt; x.pickCode === this.pick5West[i]));
          }
          console.log(this.thePicks);
    }
  }
  </code></pre>
  
  <p>}
   }
  Just wondering whats wrong with this code, it says :
  <em>ERROR 
  TypeError: this_1.thePicks is undefined</em> on browser console. Please advise!</p>