1

Usually I write C#, whenever I want to return something from an asynchronous method I write the following

Task<List<string>> GetTop10CitiesToVisitAsync() { }

Using Javascript I have the possibility to mark a method with the async keyword. Is it possible to return an array from this method, or do I need to use a callback function?

Cerbrus
  • 70,800
  • 18
  • 132
  • 147
Tobias Moe Thorstensen
  • 8,861
  • 16
  • 75
  • 143

0 Answers0