Home >
front end > Give a person (the person) by method (setPerson) to add attributes (name: 'xm, age: 18, sex:
Give a person (the person) by method (setPerson) to add attributes (name: 'xm, age: 18, sex:
<meta charset="utf-8"/& gt;
Method is called & lt;/title>
<body>
Complete the task//here
Var person={
SetPerson: function (property, value) {
Enclosing the property=peoperty;
this.value=https://bbs.csdn.net/topics/value;
Return (property: value)
},
}
The console. The log (person. SetPerson (name, 'xm));//not hand in the parameter
</script>