I would like provide to our future object a method which can selfdestroy/hide or something like that. How can i do It ? Thank
class BuildRobot {
constructor(size, model , color){
this.size = size;
this.model = model
this.color =color;
this.selfdestroy = function ( ?? ) {
delete/remover/hide ??;
}
}
}
let robot1 = new BuildRobot("big", "mecha","s-1","blue")
robot1.selfdestroy
console.log (robot1)