Currently, I am working on a simple check to determine whether myAnswer contains an answer. The checking functionality is operating smoothly; however, the issue arises in the final function that aims to return the string obtained from myAnswer. Instead of directly returning the string, it displays [object Promise]. This behavior is puzzling as I expect the resolved promise to return the string instead.
I would appreciate any assistance or insights on this matter!
this.myAnswer = XapiStoreService.retrieveQuestionFillIn(this.app.getStudent(), pages[pageIndex])
.then((answer:string) => {
this.myAnswer = answer;
}, (reason:string) => {
this.myAnswer = '';
});