在TypeScript 中,数组类型有多种定义方式,比较灵活。 ... let fibonacci: number[] = [1, '1', 2, 3, 5]; // Type 'string' is not assignable to type 'number'.
確定! 回上一頁