# 数组
# 数组解构
let x: number;
let y: number;
let z: number;
let five_array = [0, 1, 2, 3, 4];
[x, y, z]...= five_array;
console.log(x, y, z); // 0 1 2
# 数组展开运算符
let two_array = [0, 1];
let five_array = [......two_array, 2, 3, 4];
console.log(five_array); // [0, 1, 2, 3, 4]
# 数组遍历
let colors: string[] = ["...gender: "Male",
address: "Earth",
};
// 组装对象
let person2 = { ...person, age: 18 };
// 获取除了某些项外的其他项