Error Expression Expected

export class HomePage implements OnInit {

subscribe: any;

constructor(public Platform: Platform, ) {
this.subscribe = this.Platform.backButton.subscribeWithPriority(666666, ()

  => {

  if (this.constructor.name == "HomePage") {

    if (window.confirm ("Do you wanna exit the app?")) {

      navigator["app"].exitApp(),

   } //this is giving error on exit app

  }

});

}

ngOnInit() {
}

}

Never write code that relies on the string value of classes or methods. It will break in production.

may you show me how i can substitute that one

I would use the strategy outlined in this similar topic.