//get
let height ="178cm";
class Person{
constructor(){
// this.height = "178cm";}
get height(){
console.log("get");return height;}}
let zhangsan = new Person();
console.log(zhangsan.height)//178cm
//set
class Person{
constructor(){
// this.height = "178cm";}
set height(newValue){
console.log(newValue);
height = newValue;//180cm}}
let zhangsan = new Person();
zhangsan.height ="180cm";