我想打电话给age
,name
和height
在一起,从只有1名为this.anh
从名为person
函数变量。 我写清单的方式是错误的,但是正确的符号是什么?如果有多种方式,请写下来。 :)构建功能和它的变量
<script type="text/javascript">
function person(age, name, height){
this.age = age;
this.name = name;
this.height = height;
this.anh = age, name, height;
}
var koolz = new person(20,"koolz",200);
document.write(koolz.anh)
</script>
预期的结果是什么? '“20,koolz,200”'? –
是的!那就对了! @EliasSoares – KOOLz