```javascript ``` ![在這裡插入圖片描述](https://img-blog.csdnimg.cn/20200404222513323.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text... ...
<script>
//方式一
let obj1 = new Object();
obj1.name = "zs";
obj1.age = 18;
obj1.gender = "male";
obj1.say = function() {
console.log(this.name + ": Hello!");
};
obj1.say();
//方式二
let obj2 = {};
obj2.name = "ls";
obj2.age = 19;
obj2.gender = "male";
obj2.say = function () {
console.log(this.name + ": Hello!");
};
obj2.say();
//方式三
let obj3 = {
name: "ww",
age: 20,
gender: "male",
say : function () {
console.log(this.name + ": Hello!");
}
};
obj3.say();
</script>