九州编程
123456789101112131415161718interface People {readonly name: stringreadonly age: number}const people: People = { name: 'tom', age: 16}for(let key in people){console.log(key)}const people2: ReadonlyArray<People> = [{ name: 'tom', age: 14 }]//遍历数组类型for(let key of people2){}for(let key in people2){}people2.forEach((data: People) => console.log(data))