SOURCE

// Object中有get和set时,对象的属性,只能通过get和set调用、访问,无法直接访问
let obj = {
  name: 'chenlong',
  job: 'web developer',
  get returnName () {
		return this.name  
	},
	set job(s){
    this.job = s
  },
	get j(){
    return this.job
  }
}

console.log(obj.returnName)
console 命令行工具 X clear

                    
>
console