javascript class getter setter
class Porn_Stars{
constructor(name,age){
this.name = name;
this.age = age
};
get get_data () {
return this.name;
};
set change_data (value) {
this.name = value;
}
};
const data = new Porn_Stars("Chloe Cherry",21);
console.log("This is the name before she has changed > "+data.name+"<br/>");
data.change_data="Chloe Culture";
console.log("After changing the name,"+data.name)
Modern Manatee