Hi all,
apologies if this is a daft question, but I am re-writing a major app from Ionic1 to Ionic4 and have a challenge.
I need to return data from several functions, but I get the msg:
"A return statement can only be used in a function body"
The function I have created, is as follows:
Name: getTeamNameFromID(id) (type:method)
the code simply loops around an array until it finds the id passed by the caller, then returns the name in the array at that point.
Can anyone tell me how I return the string please?