主页
TypeScript
TypeScript 对象类型
demo_object_types_ex
运行 ❯
×
更改方向
保存代码
更改主题
// Try playing around with modifying properties and adding ones to see what happens const car: { type: string, model: string, year: number } = { type: "Toyota", model: "Corolla", year: 2009 }; console.log(car);
{ type: 'Toyota', model: 'Corolla', year: 2009 }