I can't seem to find an answer that works. I have an observable that I'm subscribing to like so:

```
this.contentfulService.weekNumber
    .subscribe(
        (weekNumber) => { this.weekNumber = weekNumber; }
    );

```

and I want to do something after the data has been received and put into my variable `this.weekNumber` I have tried doing this:

```
this.contentfulService.weekNumber
    .subscribe(
        (weekNumber) => { weekNumber = this.weekNumber; },
        (error) => { console.log(error); },
        () => { console.log(this.weekNumber); }
    );

```

but I'm not getting the `console.log`? Im only using the console.log as a test, I actually want to use the data that is in `this.weekNumber` to populate something but when I put it right after the `weekNumber = this.weekNumber` I get undefined so I need to be able to call a function after `this.weekNumber` has been defined

Any help would be appreciated.