Customize Alert Message: Show dynamic message in ionic 3/4 alert component

In one of my client’s projects, there was a situation where I wanted to update the alert message after a certain event but I was not aware of how to do it as it was not mentioned in the official ionic docs.