If I have a statement like:
public startDate = this.formatDate(new Date());
I would like to instead of passing new Date(), pass a date created by a function. I know I can do:
public startDate = this.formatDate(this.getDateFunc());
But is there a way to do it with a lambda function? I tried looking it up, but all the posts I found were talking about function as a parameter in the definition.
I want to do something like:
public startDate = this.formatDate(() => {...});