// 字面量的简化,推荐使用
let name = "朱老师";
let user = {
// name:name,
name,
email: "25@qq.com",
// getName:function(){
// return this.name;
// },
getName (){
return `${this.name}的&&&&&&&&&&邮箱是${this.email}`;
},
};
console.log(`${user.name}的邮箱是${user.email} `);
console.log(user.getName());
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!