📅  最后修改于: 2022-03-11 15:02:13.211000             🧑  作者: Mango
function Penguin(name){
this.name=name;
this.numLegs=2;
}
var emperor = new Penguin("emperor");
console.log(emperor.name);
console.log(emperor.numLegs);