If I have an array variable in TypeScript, should I use Array<type>
or type[]
to define that array? I have seen elsewhere that there is no syntactical difference, but if that is the case, then which one should I use in general and why?
Edit: Several people have suggested this question. While it confirms that the two are syntactically identical, it hasn't helped me determine which version to actually use in my programs. (I'm not sure if opinion-oriented questions are unpopular on SO, but that is essentially what I'm asking - which one do most people prefer to use, and is there a reason for that?)