How dose Angular or Typescripts work? : I dont know exactly how Angular or Typescripts works, I think in this code , it should be 3 1 2. but it is 1 2 3. Please help me.

    confirmDelete(id: number) {
        this.commentService.queryByStoryId(id).subscribe(
            (res: ResponseWrapper) => {
                this.comments = res.json;
                console.log(3);
            },
            (res: ResponseWrapper) => this.onError(res.json)
        );
        console.log(1);
        console.log(2);
        // for (let i = 0; i < this.comments.length; i++) {
        //     this.commentService.delete(this.comments[i].id);
        // }
        this.postService.delete(id).subscribe((response) => {
            this.eventManager.broadcast({
                name: 'postListModification',
                content: 'Deleted an post'
            });
            this.activeModal.dismiss(true);
        });
    }
[Code][1]   [Console][2]


  [1]: https://i.stack.imgur.com/rIEat.png
  [2]: https://i.stack.imgur.com/MEcs6.png