Я изучаю Объект Javascript.Я построил некоторые кодировки ниже.Когда я удаляю this.recall = вспомните, это не сработало.Но когда я добавляю this.recall =all, весь код работал.Я не знаю, почему мне нужно поместить this.recall = rev, чтобы получить результат, потому что он не имеет никакого значения при вызове функции.
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript">
function recall (){
document.write('the height is:'+ this.height+'<br>');
document.write('the weight is:'+ this.weight+'<br>');
document.write('the age is:'+ this.age+'<br>');
}
function Private(height,weight,age){
this.height=height;
this.weight=weight;
this.age=age;
this.recall=recall;
}
</script>
</head>
<body>
<script type="text/javascript">
var man= new Private('170cm','60kg','26-year-old');
man.recall();
</script>
</body>