Why cant define the objects starts with App. using var?

      return App.Comments;

var App.Comments=[



In the above code, model doesn’t recognize App.Comments. But if i remove var then its working. why is it so ?


Remove var before App.Comments. ( you’re not defining a new variable, you’re setting a property on App object )