specify return type of array function typescript code example
Example: typescript function return array
function retarray():string[] {
return new Array("Apple","Grappe","Banana");
}
var fruits:string[] = retarray();
function retarray():string[] {
return new Array("Apple","Grappe","Banana");
}
var fruits:string[] = retarray();