create an array with 2 elements typescript code example Example: typescript how to create an array instance var myInstance:MyArrayType[] = [];