1. const numberArr: number[] = [1, 2, 3];
    2. const stringArr: string[] = ["a", "b", "c"];
    3. const undefinedArr: undefined[] = [undefined, undefined];

    一:多种基本数据类型

    1. const numArr: (Number|String)[] = [1,2,3,'4']

    二:对象数组

    1. // 正常情况
    2. const xiaoJieJies: { name: string, age: Number }[] = [
    3. { name: "刘英", age: 18 },
    4. { name: "谢大脚", age: 28 },
    5. ];
    6. // 类型别名
    7. type Lady = { name: string, age: Number };
    8. const xiaoJieJies: Lady[] = [
    9. { name: "刘英", age: 18 },
    10. { name: "谢大脚", age: 28 },
    11. ];
    12. // class类
    13. class Madam {
    14. name: string;
    15. age: number;
    16. }
    17. const xiaoJieJies: Madam[] = [
    18. { name: "刘英", age: 18 },
    19. { name: "谢大脚", age: 28 },
    20. ];

    三:元组

    1. // 规定数组元素顺序
    2. const xiaojiejie: [string, string, number] = ["dajiao", "teacher", 28];