1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| let list1: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9]
let list2: number[] = [1, 2, 3, 4, 5, "one"]
console.log(list2);
list2.unshift("zero") console.log(list2);
let list3: any[] = [1, 2, 3, 4, 5, "one", "two", "three"] console.log(list3);
let list4: Array<number> = [1, 2, 3, 4, 5] console.log(list4);
interface NumberArray { [index: number]: number; }
let list5: NumberArray = [1, 2, 3] console.log(list5);
let list6: number[][] = [[1, 2, 3], [1, 2, 3]] console.log(list6);
function Arr(...args: any): void { console.log(arguments); let arr: IArguments = arguments }
interface IArguments1 { [index: number]: any; length: number; callee: Function } Arr(100, 200, 300)
|