Question: I need to create a variable that lists all the existing databases in my system, because I need it and I don't know how to do it. I have tried to create variables like this one:

```
DECLARE @nombreBD INT;
SET @nombreBD = (SELECT [database_id] FROM sys.databases Where name = 'model' )
SELECT @nombreBD AS Database_ID
PRINT @nombreBD
GO 

```

This variable gets me only the name I put in the "WHERE" parameter but I need to get them all.

The table sys.databases shows you all the existing databases in the system and I need to get a boolean value from it, I thought to get it from the column "database\_id" that's why I declared this variable.

Answer: 
Here is one way to do it:

```js
class Parent {
  propertyToKeep = 'hi';
  propertyToDelete = 'bye';
  constructor() {}
}

class Child extends Parent {
  constructor() {
    super();
    delete this.propertyToDelete;
  }
}

const myObject = new Child();

console.log(myObject);
/* OUTPUT:
  {
    "propertyToKeep": "hi"
  }
*/
```
You need to use `Object.defineProperty` function, for make a restriction in descriptor, **enumerable** to **false** and `getter`, `setter` with specific condition, here a complete example:

```js
//A small example of how to make an invisible property in Child class.

class Parent{

 constructor(){

  this.propertyToKeep = "Visible";
  this.propertyToDelete = "Not visible in subclass child";

 }
}

Object.defineProperty(Parent.prototype, "propertyToDelete",  {enumerable: false,
 configurable: true,
 get: function(){
     if(!(this instanceof Child)){

        return this._propertyToDelete;
     }
 },
 set: function(v){

    if(!(this instanceof Child)){

        this._propertyToDelete = v;
    }

 }});

 Object.freeze(Parent.prototype);

class Child extends Parent {
  constructor() {
    super();
  }
}

//console.log(Child.prototype);

let chd = new Child();

console.log("Child: --------------------------------");

console.log(chd);

console.log(chd.propertyToDelete); //Undefined

console.log("Parent: -------------------------------");

let prt = new Parent();

console.log(prt);

console.log(prt.propertyToDelete); //"Not visible in subclass child"

/*let chdObj = Object.getOwnPropertyDescriptors(Child.prototype);

console.log(chdObj);*/

class SomeComponent{

  #child;

  constructor(child) {

    this.#child = child;

    console.log(this.#child); //{propertyToKeep: "Visible"}

    console.log(this.#child.propertyToKeep /*work*/);

    console.log(this.#child.propertyToDelete /*undefined*/);

  }
}

//Now i will invoke SomeComponent

console.log("SomeComponent: -------------------------");

let sc = new SomeComponent(new Child());
```